Пример #1
0
Matrix<T> SymMatrix<T>::operator*(const BaseMatrix<T>& rhs) const
{
  if(Matrix<T>::numCols() != rhs.numRows())
    throw InvalidVectorMath("Trying to multiply two incompatable matrices");

  Matrix<T> retval(Matrix<T>::numRows(), rhs.numCols());
  for(unsigned long i = 0; i < Matrix<T>::numRows(); i++)
    for(unsigned long j = 0; j < rhs.numCols(); j++)
      for(unsigned long k = 0; k < rhs.numCols(); k++)
        retval.at(i,j) += (*this)(i,k) * rhs(k, j);
  return retval;
}