A runtime-sized dense matrix. More...
Public Member Functions | |
DynamicMatrix () | |
defautl constructor, no allocation | |
DynamicMatrix (std::size_t m, std::size_t n) | |
construct with size m by n | |
std::size_t | getRows () const |
get the number of rows (first index) | |
std::size_t | getColumns () const |
get the number of columns (second index) | |
void | setSize (std::size_t m, std::size_t n) |
resize to m by n | |
double | operator() (std::size_t i, std::size_t j) const |
immutable index operator | |
double & | operator() (std::size_t i, std::size_t j) |
mutable index operator | |
DynamicMatrix & | operator+= (DynamicMatrix const &b) |
add a matrix to this matrix | |
DynamicMatrix & | operator-= (DynamicMatrix const &b) |
subtract a matrix from this matrix | |
DynamicMatrix & | operator*= (double s) |
multiply this matrix by a scalar | |
DynamicMatrix & | operator/= (double s) |
divide this matrix by a scalar | |
void | getRow (std::size_t i, DynamicVector &r) const |
copy row data into a DynamicVector | |
void | getColumn (std::size_t j, DynamicVector &r) const |
copy column data into a DynamicVector | |
void | setRow (std::size_t i, DynamicVector const &r) |
copy row data from a DynamicVector | |
void | setColumn (std::size_t j, DynamicVector const &r) |
copy column data from a DynamicVector |
A runtime-sized dense matrix.
see apf::DynamicVector for some general guidance on apf::DynamicMatrix as opposed to apf::Matrix. This class is meant to be used for small matrices whose size is not known at compile time. For big, sparse, or parallel matrices, look outside of APF.
Definition at line 23 of file apfDynamicMatrix.h.