|
Simpatico
v1.10
|
Dynamically allocated Matrix.
#include <DMatrix.h>
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... | |
| Util::DMatrix< Data >::DMatrix | ( | ) |
| Util::DMatrix< Data >::DMatrix | ( | const DMatrix< Data > & | other | ) |
Copy constructor.
Definition at line 102 of file DMatrix.h.
References Util::DMatrix< Data >::allocate(), Util::Matrix< Data >::capacity1_, Util::Matrix< Data >::capacity2_, Util::Matrix< Data >::data_, and UTIL_THROW.
| 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_.
| DMatrix< Data > & Util::DMatrix< Data >::operator= | ( | const DMatrix< Data > & | other | ) |
Assignment.
| Exception | if 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.
| void Util::DMatrix< Data >::allocate | ( | int | capacity1, |
| int | capacity2 | ||
| ) |
Allocate memory for a matrix.
| capacity1 | number of rows (range of first index) |
| capacity2 | number 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().
| void Util::DMatrix< Data >::deallocate | ( | ) |
Deallocate the underlying memory block.
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.
|
inline |
Return true if the DMatrix has been allocated, false otherwise.
Definition at line 202 of file DMatrix.h.
References Util::Matrix< Data >::data_.
Referenced by Util::bcast(), Util::DSymmMatrixParam< Type >::bcastValue(), Util::DMatrixParam< Type >::bcastValue(), Util::DMatrix< Data >::deallocate(), Util::DSymmMatrixParam< Type >::loadValue(), Util::DMatrixParam< Type >::loadValue(), Util::DMatrixParam< Type >::readValue(), Util::DSymmMatrixParam< Type >::readValue(), Util::recv(), Util::send(), Util::DMatrix< Data >::serialize(), Util::DMatrixParam< Type >::writeParam(), and Util::DSymmMatrixParam< Type >::writeParam().
| void Util::DMatrix< Data >::serialize | ( | Archive & | ar, |
| const unsigned int | version | ||
| ) |
Serialize a DMatrix to/from an Archive.
| ar | archive |
| version | archive version id |
Definition at line 210 of file DMatrix.h.
References Util::DMatrix< Data >::allocate(), Util::Matrix< Data >::capacity1(), Util::Matrix< Data >::capacity1_, Util::Matrix< Data >::capacity2(), Util::Matrix< Data >::capacity2_, Util::Matrix< Data >::data_, Util::DMatrix< Data >::isAllocated(), and UTIL_THROW.
1.8.11