PSCF v1.1
Public Member Functions | List of all members
Util::DRaggedMatrix< Data > Class Template Reference

Dynamically allocated RaggedMatrix. More...

#include <DRaggedMatrix.h>

Inheritance diagram for Util::DRaggedMatrix< Data >:
Util::RaggedMatrix< Data >

Public Member Functions

 DRaggedMatrix ()
 Constructor. More...
 
 ~DRaggedMatrix ()
 Destructor. More...
 
void allocate (DArray< int > const &rowSizes)
 Allocate memory for a ragged matrix. More...
 
bool isAllocated () const
 Return true iff this DRaggedMatrix has been allocated. More...
 
- Public Member Functions inherited from Util::RaggedMatrix< Data >
virtual ~RaggedMatrix ()
 Destructor. More...
 
int capacity1 ()
 Get number of rows. More...
 
int capacity2 (int i)
 Get number of elements in row number i. More...
 
Data const & operator() (int i, int j) const
 Return element (i,j) of matrix by const reference. More...
 
Data & operator() (int i, int j)
 Return element (i,j) of matrix by reference. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Util::RaggedMatrix< Data >
 RaggedMatrix ()
 Default constructor. More...
 
- Protected Attributes inherited from Util::RaggedMatrix< Data >
Data * data_
 One-dimensional C array of all elements. More...
 
Data ** rows_
 Array of pointers to rows. More...
 
int * capacity2_
 Array containing number of elements in each row. More...
 
int capacity1_
 Number of rows (range of first index). More...
 
int capacity_
 Total number of elements. More...
 

Detailed Description

template<typename Data>
class Util::DRaggedMatrix< Data >

Dynamically allocated RaggedMatrix.

Definition at line 24 of file DRaggedMatrix.h.

Constructor & Destructor Documentation

◆ DRaggedMatrix()

template<typename Data >
Util::DRaggedMatrix< Data >::DRaggedMatrix

Constructor.

Definition at line 65 of file DRaggedMatrix.h.

◆ ~DRaggedMatrix()

template<typename Data >
Util::DRaggedMatrix< Data >::~DRaggedMatrix

Destructor.

Delete dynamically allocated C array.

Definition at line 73 of file DRaggedMatrix.h.

Member Function Documentation

◆ allocate()

template<typename Data >
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::Array< Data >::capacity(), and UTIL_THROW.

◆ isAllocated()

template<class Data >
bool Util::DRaggedMatrix< Data >::isAllocated
inline

Return true iff this DRaggedMatrix has been allocated.

Definition at line 129 of file DRaggedMatrix.h.


The documentation for this class was generated from the following file: