|
PSCF v1.3.3
|
Dynamically allocated RaggedMatrix. More...
#include <DRaggedMatrix.h>
Public Member Functions | |
| DRaggedMatrix () | |
| Constructor. | |
| ~DRaggedMatrix () | |
| Destructor. | |
| void | allocate (DArray< int > const &rowSizes) |
| Allocate memory for a ragged matrix. | |
| bool | isAllocated () const |
| Return true iff this DRaggedMatrix has been allocated. | |
| Public Member Functions inherited from Util::RaggedMatrix< Data > | |
| virtual | ~RaggedMatrix () |
| Destructor. | |
| int | capacity1 () |
| Get number of rows. | |
| int | capacity2 (int i) |
| Get number of elements in row number i. | |
| Data const & | operator() (int i, int j) const |
| Return element (i,j) of matrix by const reference. | |
| Data & | operator() (int i, int j) |
| Return element (i,j) of matrix by reference. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Util::RaggedMatrix< Data > | |
| RaggedMatrix () | |
| Default constructor. | |
| Protected Attributes inherited from Util::RaggedMatrix< Data > | |
| Data * | data_ |
| One-dimensional C array of all elements. | |
| Data ** | rows_ |
| Array of pointers to rows. | |
| int * | capacity2_ |
| Array containing number of elements in each row. | |
| int | capacity1_ |
| Number of rows (range of first index). | |
| int | capacity_ |
| Total number of elements. | |
Dynamically allocated RaggedMatrix.
Definition at line 24 of file DRaggedMatrix.h.
| Util::DRaggedMatrix< Data >::DRaggedMatrix | ( | ) |
Constructor.
Definition at line 65 of file DRaggedMatrix.h.
References Util::RaggedMatrix< Data >::RaggedMatrix().
| Util::DRaggedMatrix< Data >::~DRaggedMatrix | ( | ) |
Destructor.
Delete dynamically allocated C array.
Definition at line 73 of file DRaggedMatrix.h.
References Util::RaggedMatrix< Data >::capacity1_, Util::RaggedMatrix< Data >::capacity2_, Util::RaggedMatrix< Data >::capacity_, Util::RaggedMatrix< Data >::data_, Util::Memory::deallocate(), and Util::RaggedMatrix< Data >::rows_.
| void Util::DRaggedMatrix< Data >::allocate | ( | DArray< int > const & | rowSizes | ) |
Allocate memory for a ragged matrix.
Definition at line 90 of file DRaggedMatrix.h.
References Util::Memory::allocate(), Util::Array< Data >::capacity(), Util::RaggedMatrix< Data >::capacity1_, Util::RaggedMatrix< Data >::capacity2_, Util::RaggedMatrix< Data >::capacity_, Util::RaggedMatrix< Data >::data_, Util::RaggedMatrix< Data >::rows_, and UTIL_THROW.
|
inline |
Return true iff this DRaggedMatrix has been allocated.
Definition at line 129 of file DRaggedMatrix.h.
References Util::RaggedMatrix< Data >::data_.