template<class C>
Multiplication.
Definition at line 167 of file Matrix.h. References CxMatrixTem< C >::i(), CxMatrixTem< C >::nCol(), and CxMatrixTem< C >::nRow(). 00168 { 00169 if (nCol() != a.nRow()) { 00170 CX_CERR << "nonconformant CxMatrixTem * CxMatrixTem operands." 00171 << CX_ENDL; 00172 return CxMatrixTem<C>(0,0); 00173 } 00174 CxMatrixTem<C> m((*this).nRow(), a.nCol(), 0.0); 00175 double sum; 00176 int i, j, k; 00177 for (i=0 ; i<nRow() ; i++) { 00178 for (j=0 ; j<a.nCol() ; j++) { 00179 sum = 0; 00180 for (k=0 ; k<nCol() ; k++) 00181 sum += (*this)[i][k] * a[k][j]; 00182 m[i][j] = sum; 00183 } 00184 } 00185 return m; 00186 }
Here is the call graph for this function:
|