Public Member Functions

apf::DynamicMatrix Class Reference

A runtime-sized dense matrix. More...

List of all members.

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
DynamicMatrixoperator+= (DynamicMatrix const &b)
 add a matrix to this matrix
DynamicMatrixoperator-= (DynamicMatrix const &b)
 subtract a matrix from this matrix
DynamicMatrixoperator*= (double s)
 multiply this matrix by a scalar
DynamicMatrixoperator/= (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

Detailed Description

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines