template<class C>
Multiplication.
Definition at line 175 of file MatrixTem.h. References Impala::Core::Matrix::MatrixTem< C >::i(), Impala::Core::Matrix::MatrixTem< C >::nCol(), and Impala::Core::Matrix::MatrixTem< C >::nRow(). 00176 { 00177 if (nCol() != a.nRow()) { 00178 std::cerr << "nonconformant MatrixTem * MatrixTem operands." 00179 << std::endl; 00180 return MatrixTem<C>(0,0); 00181 } 00182 MatrixTem<C> m((*this).nRow(), a.nCol(), 0.0); 00183 double sum; 00184 int i, j, k; 00185 for (i=0 ; i<nRow() ; i++) { 00186 for (j=0 ; j<a.nCol() ; j++) { 00187 sum = 0; 00188 for (k=0 ; k<nCol() ; k++) 00189 sum += (*this)[i][k] * a[k][j]; 00190 m[i][j] = sum; 00191 } 00192 } 00193 return m; 00194 }
Here is the call graph for this function:
|