#include <CHArray.H>
Useful for allocating an array of matrices which can be easily passed to Fortran, etc.
Example - 1D Array of 2 3x3 matrices
* * CHArray<CHMatrix, 1, ArZeroRow, ArSp::ArrayOfMatrixAlloc> AM; * AM.getAllocator().define(3, 3); * AM.define(2); * AM(0) = 1.1; * AM(1) = 1.9; * std::cout << AM << std::endl; *
Public Member Functions | |
ArrayOfMatrixAlloc () | |
void | define (const USz_t a_m, const USz_t a_n) |
CHMatrix * | allocate (const USz_t size) |
void | deallocate (CHMatrix *p, const USz_t size) |
Private Attributes | |
Real * | matrixData |
USz_t | m |
USz_t | n |
bool | defined |
ArSp::ArrayOfMatrixAlloc::ArrayOfMatrixAlloc | ( | ) | [inline] |
References CH_assert, CHArray< T, Rank, ArConf, Alloc >::define(), and M.
Real* ArSp::ArrayOfMatrixAlloc::matrixData [private] |
USz_t ArSp::ArrayOfMatrixAlloc::m [private] |
USz_t ArSp::ArrayOfMatrixAlloc::n [private] |
bool ArSp::ArrayOfMatrixAlloc::defined [private] |