Skip to content

Commit c8b4059

Browse files
committed
Add operator * for matrices
1 parent 8ae1016 commit c8b4059

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cp-algo/linalg/matrix.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,5 +251,7 @@ namespace cp_algo::linalg {
251251
return std::array{pivots, free};
252252
}
253253
};
254+
template<typename base_t>
255+
auto operator *(base_t t, matrix<base_t> const& A) {return A * t;}
254256
}
255257
#endif // CP_ALGO_LINALG_MATRIX_HPP

0 commit comments

Comments
 (0)