172 if ( left._range != right._range )
174 std::cerr <<
"These matrices cannot be multiplied." << std::endl;
182 for (
int row = 0; row < left._range; row++ )
183 for (
int col = 0; col < right._range; col++ )
184 (*mat)[ row ][ col ] = 0;
186 for (
int row = 0; row < left._range; row++ )
187 for (
int col = 0; col < right._range; col++ )
188 for (
int line = 0; line < right._range; line++ )
189 (*mat)[ row ][ col ] += left._mat[ row ][ line ] * right._mat[ line ][ col ];