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