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, 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 #endif//CPPSL_DEBUG
00076   
00077   for(int i=0; i<vecA.Ll; i++){ vecB.Array[i] +=vecA.Array[i]; }
00078   
00079   return vecB;
00080 }

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

dcovector-_dcovector operator

Definition at line 84 of file dcovector-_dcovector.hpp.

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

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

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

dcovector^T*_dcovector operator (inner product)

Definition at line 106 of file dcovector-_dcovector.hpp.

References _dcovector::Array, dcovector::Array, _dcovector::Desc, dcovector::Desc, _dcovector::destroy(), _dcovector::L, and dcovector::L.

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


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