mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 10:27:16 +02:00
Compilation errors in LA example fixed
This commit is contained in:
@ -33,7 +33,7 @@ template<class ET, class OT>
|
|||||||
std::ostream& operator<<(std::ostream& os, const std::experimental::math::vector<ET, OT>& v)
|
std::ostream& operator<<(std::ostream& os, const std::experimental::math::vector<ET, OT>& v)
|
||||||
{
|
{
|
||||||
os << "|";
|
os << "|";
|
||||||
for (size_t i = 0; i < v.size(); ++i) {
|
for (auto i = 0; i < v.size(); ++i) {
|
||||||
os << fmt::format(" {:>9}", v(i));
|
os << fmt::format(" {:>9}", v(i));
|
||||||
}
|
}
|
||||||
os << " |";
|
os << " |";
|
||||||
@ -43,9 +43,9 @@ std::ostream& operator<<(std::ostream& os, const std::experimental::math::vector
|
|||||||
template<class ET, class OT>
|
template<class ET, class OT>
|
||||||
std::ostream& operator<<(std::ostream& os, const std::experimental::math::matrix<ET, OT>& v)
|
std::ostream& operator<<(std::ostream& os, const std::experimental::math::matrix<ET, OT>& v)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < v.rows(); ++i) {
|
for (auto i = 0; i < v.rows(); ++i) {
|
||||||
os << "|";
|
os << "|";
|
||||||
for (size_t j = 0; j < v.columns(); ++j) {
|
for (auto j = 0; j < v.columns(); ++j) {
|
||||||
os << fmt::format(" {:>9}", v(i, j));
|
os << fmt::format(" {:>9}", v(i, j));
|
||||||
}
|
}
|
||||||
os << (i != v.rows() - 1 ? " |\n" : " |");
|
os << (i != v.rows() - 1 ? " |\n" : " |");
|
||||||
|
Reference in New Issue
Block a user