Numerical matrix. More...
#include <NumMat.hpp>
Public Member Functions | |
void | allocate (F *data=NULL) |
Helper function allocating the memory pointed by the data_ attribute. | |
void | deallocate () |
Helper function freeing memory pointed by the data_ attribute. | |
NumMat (Int m=0, Int n=0) | |
NumMat (Int m, Int n, bool owndata, F *data) | |
NumMat (const NumMat &C) | |
NumMat & | Copy (const NumMat &C) |
NumMat & | operator= (const NumMat &C) |
void | Resize (Int m, Int n) |
const F & | operator() (Int i, Int j) const |
F & | operator() (Int i, Int j) |
F * | Data () const |
F * | VecData (Int j) const |
Int | m () const |
Int | n () const |
Int | Size () const |
Int | ByteSize () const |
Int | AllocatedSize () const |
Public Attributes | |
bool | owndata_ |
Whether it owns the data. | |
Int | m_ |
The size of the first dimension. | |
Int | n_ |
The size of second dimension. | |
F * | data_ |
The pointer for the actual data. | |
Int | bufsize_ |
Actual size of the allocated buffer. Similar to the capacity of a std::vector. | |
Numerical matrix.
NumMat is a portable encapsulation of a pointer to represent a 2D matrix, which can either own (owndata == true) or view (owndata == false) a piece of data.