Constructs a matrix from a two dimensional array of elements.
#include <iostream>
#include <iomanip>
template <class value_t, class alloc_t, class derived_t, class policy_t>
{
for (std::size_t iRow = 0; iRow < m.
Rows(); ++iRow)
{
os << '[';
for (auto& c:m)
{
os << ' ' << std::setw(3) << c[iRow];
}
os << "]\n";
}
return os;
}
int main(int, char**)
{
int array[][4] =
{
{1, 2, 3, 4},
{4, 3, 2, 1}
};
std::cout << Chusov::Math::Matrix<int>(array);
return 0;
}
mathematical and arithmetical functions mostly over integer operands.
A class template for matrices of elements of various types and semantics, including types which do no...
Definition: chsvmath.h:6374
size_type Rows() const
Returns a number of rows in the current matrix.