Skip to content

Commit

Permalink
Add operator * for matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
adamant-pwn committed Oct 17, 2024
1 parent 8ae1016 commit c8b4059
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cp-algo/linalg/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,5 +251,7 @@ namespace cp_algo::linalg {
return std::array{pivots, free};
}
};
template<typename base_t>
auto operator *(base_t t, matrix<base_t> const& A) {return A * t;}
}
#endif // CP_ALGO_LINALG_MATRIX_HPP

0 comments on commit c8b4059

Please sign in to comment.