Go to the source code of this file.
Functions | |
_drovector | operator+ (const drovector &vecA, const _drovector &vecB) |
_drovector | operator- (const drovector &vecA, const _drovector &vecB) |
double | operator% (const drovector &vecA, const _drovector &vecB) |
|
drovector+_drovector operator Definition at line 64 of file drovector-_drovector.hpp. References drovector::Array, _drovector::Array, _drovector::L, drovector::L, and drovector::Ll.
00065 { 00066 #ifdef CPPSL_DEBUG 00067 if( vecA.L!=vecB.L ){ 00068 std::cerr << "[ERROR] operator+(const drovector&, const _drovector&)" 00069 << 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(long i=0; i<vecA.Ll; i++){ vecB.Array[i] +=vecA.Array[i]; } 00078 00079 return vecB; 00080 } |
|
drovector-_drovector operator Definition at line 84 of file drovector-_drovector.hpp. References drovector::Array, _drovector::Array, _drovector::L, drovector::L, and drovector::Ll.
00085 { 00086 #ifdef CPPSL_DEBUG 00087 if( vecA.L!=vecB.L ){ 00088 std::cerr << "[ERROR] operator-(const drovector&, const _drovector&)" 00089 << 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(long i=0; i<vecA.Ll; i++){ 00098 vecB.Array[i] =vecA.Array[i]-vecB.Array[i]; 00099 } 00100 00101 return vecB; 00102 } |
|
drovector*_drovector^T operator (inner product) Definition at line 106 of file drovector-_drovector.hpp. References _drovector::Array, drovector::Array, _drovector::Desc, drovector::Desc, _drovector::destroy(), _drovector::L, and drovector::L.
00107 { 00108 #ifdef CPPSL_DEBUG 00109 if( vecA.L!=vecB.L ){ 00110 std::cerr << "[ERROR] operator%(const drovector&, const _drovector&)" 00111 << 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 } |