1template<
int Rows,
int Cols,
typename Scalar>
3 Matrix<Rows,Cols,Scalar>& matrix,
9 for (
int i=0;
i < Rows;
i++) {
10 for (
int j=0;
j < Cols;
j++) {
11 matrix(i,j) *= scalar;
19template<
int Rows,
int Cols,
typename Scalar>
24 Matrix<Rows,Cols,Scalar> result(matrix);
28 for (
int i=0;
i < Rows;
i++) {
29 for (
int j=0;
j < Cols;
j++) {
30 result(i,j) = matrix(i,j)*scalar;
37template<
int Rows,
int Cols,
typename Scalar>
42 return matrix * scalar;
46template<
int Rows,
int Cols>
51 return std::complex<double>( scalar ) * matrix;
Matrix< Rows, Cols, Scalar > & operator*=(Matrix< Rows, Cols, Scalar > &matrix, const Scalar &scalar)
Matrix< Rows, Cols, Scalar > operator*(const Matrix< Rows, X, Scalar > &lhs, const Matrix< X, Cols, Scalar > &rhs)