Main Page | Class List | File List | Class Members | File Members | Related Pages

dcovector-dcovector.hpp File Reference

Go to the source code of this file.

Functions

_dcovector operator+ (const dcovector &vecA, const dcovector &vecB)
_dcovector operator- (const dcovector &vecA, const dcovector &vecB)
double operator% (const dcovector &vecA, const dcovector &vecB)


Function Documentation

_dcovector operator+ const dcovector vecA,
const dcovector vecB
[inline]
 

dcovector+dcovector operator

Definition at line 64 of file dcovector-dcovector.hpp.

References dcovector::Array, _dcovector::Array, dcovector::L, and _dcovector::Ll.

00065 {
00066 #ifdef  CPPSL_DEBUG
00067   if(vecA.L!=vecB.L){
00068     std::cerr
00069       << "[ERROR] operator+(const dcovector&, const dcovector&)" << std::endl
00070       << "These two vectors can not make a sumation." << std::endl
00071       << "Your input was (" << vecA.L << ") + (" << vecB.L << ")."
00072       << std::endl;
00073     exit(1);
00074   }
00075   
00076 #endif//CPPSL_DEBUG
00077 
00078   _dcovector newvec(vecA.L);
00079   for(int i=0; i<newvec.Ll; i++){
00080     newvec.Array[i] =vecA.Array[i]+vecB.Array[i];
00081   }
00082   
00083   return newvec;
00084 }

_dcovector operator- const dcovector vecA,
const dcovector vecB
[inline]
 

dcovector-dcovector operator

Definition at line 88 of file dcovector-dcovector.hpp.

References dcovector::Array, _dcovector::Array, dcovector::L, and _dcovector::Ll.

00089 {
00090 #ifdef  CPPSL_DEBUG
00091   if(vecA.L!=vecB.L){
00092     std::cerr
00093       << "[ERROR] operator-(const dcovector&, const dcovector&)" << std::endl
00094       << "These two vectors can not make a subtraction." << std::endl
00095       << "Your input was (" << vecA.L << ") - (" << vecB.L << ")."
00096       << std::endl;
00097     exit(1);
00098   }
00099 #endif//CPPSL_DEBUG
00100   
00101   _dcovector newvec(vecA.L);
00102   for(int i=0; i<newvec.Ll; i++){
00103     newvec.Array[i] =vecA.Array[i]-vecB.Array[i];
00104   }
00105   
00106   return newvec;
00107 }

double operator% const dcovector vecA,
const dcovector vecB
[inline]
 

dcovector^T*dcovector operator (inner product)

Definition at line 111 of file dcovector-dcovector.hpp.

References dcovector::Array, dcovector::Desc, and dcovector::L.

00112 {
00113 #ifdef  CPPSL_DEBUG
00114   if(vecA.L!=vecB.L){
00115     std::cerr
00116       << "[ERROR] operator%(const dcovector&, const dcovector&)" << std::endl
00117       << "These two vectors can not make a dot product." << std::endl
00118       << "Your input was (" << vecA.L << ") % (" << vecB.L << ")."
00119       << std::endl;
00120     exit(1);
00121   }
00122 #endif//CPPSL_DEBUG
00123   
00124   double val;
00125   pddot_( vecA.L, val,
00126           vecA.Array, 1, 1, vecA.Desc, 1, vecB.Array, 1, 1, vecB.Desc, 1 );
00127   
00128   return val;
00129 }


Generated on Sat Jan 31 19:25:44 2004 for CPPScaLapack by doxygen 1.3.5