Simpatico  v1.10
List of all members | Public Member Functions
Util::DMatrix< Data > Class Template Reference

Detailed Description

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

Dynamically allocated Matrix.

Definition at line 24 of file DMatrix.h.

#include <DMatrix.h>

Inheritance diagram for Util::DMatrix< Data >:
Util::Matrix< Data >

Public Member Functions

 DMatrix ()
 Constructor. More...
 
 DMatrix (const DMatrix< Data > &other)
 Copy constructor. More...
 
DMatrix< Data > & operator= (const DMatrix< Data > &other)
 Assignment. More...
 
 ~DMatrix ()
 Destructor. More...
 
void allocate (int capacity1, int capacity2)
 Allocate memory for a matrix. More...
 
void deallocate ()
 Deallocate the underlying memory block. More...
 
bool isAllocated () const
 Return true if the DMatrix has been allocated, false otherwise. More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize a DMatrix to/from an Archive. More...
 
- Public Member Functions inherited from Util::Matrix< Data >
virtual ~Matrix ()
 Destructor. More...
 
int capacity1 () const
 Get number of rows (range of the first array index). More...
 
int capacity2 () const
 Get number of columns (range of the second array index). More...
 
const Data & 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::Matrix< Data >
 Matrix ()
 Default constructor. More...
 
- Protected Attributes inherited from Util::Matrix< Data >
Data * data_
 Pointer to 1D C array of all elements. More...
 
int capacity1_
 Number of rows (range of first index). More...
 
int capacity2_
 Number of columns (range of first index). More...
 

Constructor & Destructor Documentation

template<typename Data >
Util::DMatrix< Data >::DMatrix ( )

Constructor.

Definition at line 94 of file DMatrix.h.

template<typename Data>
Util::DMatrix< Data >::DMatrix ( const DMatrix< Data > &  other)
template<typename Data >
Util::DMatrix< Data >::~DMatrix ( )

Destructor.

Delete dynamically allocated C array.

Definition at line 156 of file DMatrix.h.

References Util::Matrix< Data >::capacity1_, Util::Matrix< Data >::capacity2_, and Util::Matrix< Data >::data_.

Member Function Documentation

template<typename Data>
DMatrix< Data > & Util::DMatrix< Data >::operator= ( const DMatrix< Data > &  other)

Assignment.

Exceptions
Exceptionif LHS and RHS dimensions do not match.

Definition at line 121 of file DMatrix.h.

References Util::DMatrix< Data >::allocate(), Util::Matrix< Data >::capacity1_, Util::Matrix< Data >::capacity2_, Util::Matrix< Data >::data_, and UTIL_THROW.

template<typename Data >
void Util::DMatrix< Data >::allocate ( int  capacity1,
int  capacity2 
)

Allocate memory for a matrix.

Parameters
capacity1number of rows (range of first index)
capacity2number of columns (range of second index)

Definition at line 170 of file DMatrix.h.

References Util::Matrix< Data >::capacity1(), Util::Matrix< Data >::capacity1_, Util::Matrix< Data >::capacity2(), Util::Matrix< Data >::capacity2_, Util::Matrix< Data >::data_, and UTIL_THROW.

Referenced by Util::DMatrixParam< Type >::bcastValue(), Util::DSymmMatrixParam< Type >::bcastValue(), DdMd::PairPotentialImpl< Interaction >::computePairEnergies(), Util::DMatrix< Data >::DMatrix(), McMd::Perturbation::loadParameters(), DdMd::OrderParamNucleation::loadParameters(), McMd::StructureFactor::loadParameters(), McMd::StructureFactorGrid::loadParameters(), McMd::StructureFactorPGrid::loadParameters(), DdMd::StructureFactorGrid::loadParameters(), McMd::IntraStructureFactorGrid::loadParameters(), DdMd::StructureFactor::loadParameters(), McMd::StructureFactorP::loadParameters(), Util::DSymmMatrixParam< Type >::loadValue(), Util::DMatrixParam< Type >::loadValue(), Util::DMatrix< Data >::operator=(), DdMd::Simulation::pairEnergies(), McMd::Perturbation::readParameters(), DdMd::OrderParamNucleation::readParameters(), McMd::StructureFactor::readParameters(), McMd::StructureFactorGrid::readParameters(), McMd::StructureFactorPGrid::readParameters(), DdMd::StructureFactorGrid::readParameters(), McMd::IntraStructureFactorGrid::readParameters(), DdMd::StructureFactor::readParameters(), McMd::StructureFactorP::readParameters(), McMd::IntraStructureFactor::readParameters(), Util::DSymmMatrixParam< Type >::readValue(), Util::DMatrix< Data >::serialize(), and McMd::LinkLTPos::setup().

template<class Data >
void Util::DMatrix< Data >::deallocate ( )

Deallocate the underlying memory block.

Exceptions
Exceptionif the DMatrix is not allocated.

Definition at line 188 of file DMatrix.h.

References Util::Matrix< Data >::capacity1_, Util::Matrix< Data >::capacity2_, Util::Matrix< Data >::data_, Util::DMatrix< Data >::isAllocated(), and UTIL_THROW.

template<class Data >
bool Util::DMatrix< Data >::isAllocated ( ) const
inline
template<class Data >
template<class Archive >
void Util::DMatrix< Data >::serialize ( Archive &  ar,
const unsigned int  version 
)

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