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) |
|
_dcovector+dcovector operator Definition at line 3 of file _dcovector-dcovector.hpp. References dcovector::Array, _dcovector::Array, dcovector::L, _dcovector::L, and _dcovector::Ll.
00004 { 00005 #ifdef CPPSL_DEBUG 00006 if(vecA.L!=vecB.L){ 00007 std::cerr 00008 << "[ERROR] operator+(const _dcovector&, const dcovector&)" << std::endl 00009 << "These two vectors can not make a sumation." << std::endl 00010 << "Your input was (" << vecA.L << ") + (" << vecB.L << ")." 00011 << std::endl; 00012 exit(1); 00013 } 00014 00015 #endif//CPPSL_DEBUG 00016 00017 for(int i=0; i<vecA.Ll; i++){ vecA.Array[i] +=vecB.Array[i]; } 00018 00019 return vecA; 00020 } |
|
_dcovector-dcovector operator Definition at line 24 of file _dcovector-dcovector.hpp. References dcovector::Array, _dcovector::Array, dcovector::L, _dcovector::L, and _dcovector::Ll.
00025 { 00026 #ifdef CPPSL_DEBUG 00027 if(vecA.L!=vecB.L){ 00028 std::cerr 00029 << "[ERROR] operator-(const _dcovector&, const dcovector&)" << std::endl 00030 << "These two vectors can not make a subtraction." << std::endl 00031 << "Your input was (" << vecA.L << ") - (" << vecB.L << ")." 00032 << std::endl; 00033 exit(1); 00034 } 00035 #endif//CPPSL_DEBUG 00036 00037 for(int i=0; i<vecA.Ll; i++){ vecA.Array[i] -=vecB.Array[i]; } 00038 00039 return vecA; 00040 } |
|
_dcovector^T*dcovector operator (inner product) Definition at line 44 of file _dcovector-dcovector.hpp. References dcovector::Array, _dcovector::Array, dcovector::Desc, _dcovector::Desc, _dcovector::destroy(), dcovector::L, and _dcovector::L.
00045 { 00046 #ifdef CPPSL_DEBUG 00047 if(vecA.L!=vecB.L){ 00048 std::cerr 00049 << "[ERROR] operator%(const _dcovector&, const dcovector&)" << std::endl 00050 << "These two vectors can not make a dot product." << std::endl 00051 << "Your input was (" << vecA.L << ") % (" << vecB.L << ")." 00052 << std::endl; 00053 exit(1); 00054 } 00055 #endif//CPPSL_DEBUG 00056 00057 double val; 00058 pddot_( vecA.L, val, 00059 vecA.Array, 1, 1, vecA.Desc, 1, vecB.Array, 1, 1, vecB.Desc, 1 ); 00060 00061 vecA.destroy(); 00062 return val; 00063 } |