Polymake Template Library (PTL)
4.2
|
Matrix type class which holds the elements in a contiguous array
Additional arithmetic operations for matrices and useful constructions (unit_matrix, diag, ...
) are listed at operations.
More...
Public Member Functions | |
Matrix () | |
create as empty | |
Matrix (Int r, Int c) | |
create matrix with r rows and c columns, initialize all elements to 0 | |
template<typename... Iterator, typename = std::enable_if_t<mlist_and_nonempty<fits_as_input_iterator<Iterator>...>::value>> | |
Matrix (Int r, Int c, Iterator &&... src) | |
template<typename... Iterator, typename = std::enable_if_t<mlist_and_nonempty<fits_as_input_iterator<Iterator>...>::value>> | |
Matrix (Int r, Int c, polymake::operations::move, Iterator &&... src) | |
Create a matrix with given dimensions. Elements are moved from one or more input sequences. | |
Matrix (const GenericMatrix< Matrix > &m) | |
Copy of a disguised Matrix object. | |
template<typename Matrix2 > | |
Matrix (const GenericMatrix< Matrix2, E > &m) | |
Copy of an abstract matrix of the same element type. | |
template<typename Matrix2 , typename E2 > | |
Matrix (const GenericMatrix< Matrix2, E2 > &m, std::enable_if_t< can_initialize< E2, E >::value, void ** >=nullptr) | |
Copy of an abstract matrix with element conversion. | |
void | swap (Matrix &m) |
Exchange the contents of two matrices in a most efficient way. | |
void | resize (Int r, Int c) |
Resize to new dimensions, added elements initialized with default constructor. | |
void | clear () |
Truncate to 0x0 matrix. | |
Int | rows () const |
the number of rows of the matrix | |
Int | cols () const |
the number of columns of the matrix | |
Matrix type class which holds the elements in a contiguous array
Additional arithmetic operations for matrices and useful constructions (unit_matrix, diag, ...
) are listed at operations.
|
inline |
Create a matrix with given dimensions. Elements are initialized from one or more input sequences. Elements are assumed to come in the row order.