Go to the source code of this file.
Functions | |
_dgematrix | operator+ (const dgematrix &matA, const _dgematrix &matB) |
_dgematrix | operator- (const dgematrix &matA, const _dgematrix &matB) |
_dgematrix | operator * (const dgematrix &matA, const _dgematrix &matB) |
|
dgematrix+_dgematrix operator Definition at line 86 of file dgematrix-_dgematrix.hpp. References dgematrix::Array, _dgematrix::Array, _dgematrix::M, dgematrix::M, dgematrix::Ml, _dgematrix::N, dgematrix::N, and dgematrix::Nl.
00087 { 00088 #ifdef CPPSL_DEBUG 00089 if(matA.N!=matB.N || matA.M!=matB.M){ 00090 std::cerr << "[ERROR] operator+(const dgematrix&, const _dgematrix&)" 00091 << std::endl 00092 << "These two matrises can not make a summation." << std::endl 00093 << "Your input was (" << matA.M << "x" << matA.N << ") + (" 00094 << matB.M << "x" << matB.N << ")." << std::endl; 00095 exit(1); 00096 } 00097 #endif//CPPSL_DEBUG 00098 00099 for(long i=0; i<matA.Ml*matA.Nl; i++){ matB.Array[i] +=matA.Array[i]; } 00100 00101 return matB; 00102 } |
|
dgematrix-_dgematrix operator Definition at line 106 of file dgematrix-_dgematrix.hpp. References dgematrix::Array, _dgematrix::Array, _dgematrix::M, dgematrix::M, dgematrix::Ml, _dgematrix::N, dgematrix::N, and dgematrix::Nl.
00107 { 00108 #ifdef CPPSL_DEBUG 00109 if(matA.N!=matB.N || matA.M!=matB.M){ 00110 std::cerr << "[ERROR] operator-(const dgematrix&, const _dgematrix&)" 00111 << std::endl 00112 << "These two matrises can not make a subtraction." << std::endl 00113 << "Your input was (" << matA.M << "x" << matA.N << ") - (" 00114 << matB.M << "x" << matB.N << ")." << std::endl; 00115 exit(1); 00116 } 00117 #endif//CPPSL_DEBUG 00118 00119 for(long i=0; i<matA.Ml*matA.Nl; i++){ 00120 matB.Array[i] =matA.Array[i]-matB.Array[i]; 00121 } 00122 00123 return matB; 00124 } |
|
dgematrix*_dgematrix operator Definition at line 128 of file dgematrix-_dgematrix.hpp. References _dgematrix::Array, dgematrix::Array, _dgematrix::Desc, dgematrix::Desc, _dgematrix::destroy(), dgematrix::M, _dgematrix::M, _dgematrix::N, and dgematrix::N.
00129 { 00130 #ifdef CPPSL_DEBUG 00131 if(matA.N!=matB.M){ 00132 std::cerr << "[ERROR] operator*(const dgematrix&, const _dgematrix&)" 00133 << std::endl 00134 << "These two matrises can not make a product." << std::endl 00135 << "Your input was (" << matA.M << "x" << matA.N << ") * (" 00136 << matB.M << "x" << matB.N << ")." << std::endl; 00137 exit(1); 00138 } 00139 #endif//CPPSL_DEBUG 00140 00141 _dgematrix newmat( matA.M, matB.N ); 00142 pdgemm_( 'N', 'N', matA.M, matB.N, matA.N, 1.0, 00143 matA.Array, 1, 1, matA.Desc, 00144 matB.Array, 1, 1, matB.Desc, 0.0, 00145 newmat.Array, 1, 1, newmat.Desc ); 00146 00147 matB.destroy(); 00148 return newmat; 00149 } |