A templated 2D matrix of objects of <T>, where the n x m matrix dimensions are known and used for subscript bounds checking, etc. More...
Public Member Functions | |
Matrix () | |
Null constructor. More... | |
Matrix (const label n, const label m) | |
Construct given number of rows and columns. More... | |
Matrix (const label n, const label m, const Type &) | |
Construct with given number of rows and columns. More... | |
Matrix (const Matrix< Form, Type > &) | |
Copy constructor. More... | |
Matrix (Istream &) | |
Construct from Istream. More... | |
autoPtr< Matrix< Form, Type > > | clone () const |
Clone. More... | |
~Matrix () | |
Destructor. More... | |
label | n () const |
Return the number of rows. More... | |
label | m () const |
Return the number of columns. More... | |
label | size () const |
Return the number of elements in matrix (n*m) More... | |
void | checki (const label i) const |
Check index i is within valid range (0 ... n-1). More... | |
void | checkj (const label j) const |
Check index j is within valid range (0 ... m-1). More... | |
void | clear () |
Clear the Matrix, i.e. set sizes to zero. More... | |
void | transfer (Matrix< Form, Type > &) |
Transfer the contents of the argument Matrix into this Matrix. More... | |
Form | T () const |
Return the transpose of the matrix. More... | |
Type * | operator[] (const label) |
Return subscript-checked row of Matrix. More... | |
const Type * | operator[] (const label) const |
Return subscript-checked row of constant Matrix. More... | |
void | operator= (const Matrix< Form, Type > &) |
Assignment operator. Takes linear time. More... | |
void | operator= (const Type &) |
Assignment of all entries to the given value. More... | |
Static Public Member Functions | |
static const Matrix< Form, Type > & | null () |
Return a null Matrix. More... | |
Private Member Functions | |
void | allocate () |
Allocate the storage for the row-pointers and the data. More... | |
Private Attributes | |
label | n_ |
Number of rows and columns in Matrix. More... | |
label | m_ |
Type **__restrict__ | v_ |
Row pointers. More... | |
Friends | |
Istream & | operator>> (Istream &, Matrix< Form, Type > &) |
Read Matrix from Istream, discarding contents of existing Matrix. More... | |
Ostream & | operator (Ostream &, const Matrix< Form, Type > &) |
A templated 2D matrix of objects of <T>, where the n x m matrix dimensions are known and used for subscript bounds checking, etc.
Definition at line 47 of file DiagonalMatrix.H.
Construct with given number of rows and columns.
and value for all elements.
|
private |
|
inlinestatic |
|
inline |
|
inline |
Return the number of rows.
Definition at line 56 of file MatrixI.H.
Referenced by CentredFitSnGradData< Polynomial >::calcFit(), FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial >::calcFit(), Foam::LUBacksubstitute(), Foam::LUDecompose(), Foam::LUsolve(), immersedBoundaryFvPatch::makeInvDirichletMatrices(), immersedBoundaryFvPatch::makeInvNeumannMatrices(), Foam::max(), Foam::min(), Foam::multiply(), Foam::operator*(), Foam::operator+(), Foam::operator-(), Foam::solve(), and SVD::SVD().
|
inline |
Return the number of columns.
Definition at line 63 of file MatrixI.H.
Referenced by CentredFitSnGradData< Polynomial >::calcFit(), FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial >::calcFit(), immersedBoundaryFvPatch::makeInvDirichletMatrices(), immersedBoundaryFvPatch::makeInvNeumannMatrices(), Foam::max(), Foam::min(), Foam::multiply(), Foam::operator*(), Foam::operator+(), Foam::operator-(), and SVD::SVD().
|
inline |
|
inline |
|
inline |
void transfer | ( | Matrix< Form, Type > & | a | ) |
Form T | ( | ) | const |
Return the transpose of the matrix.
Definition at line 162 of file Matrix.C.
Referenced by SVD::SVD().
void operator= | ( | const Type & | ) |
Assignment of all entries to the given value.
|
private |
Number of rows and columns in Matrix.
Definition at line 78 of file Matrix.H.
Referenced by Matrix< RectangularMatrix< Type >, Type >::transfer().
|
private |
Definition at line 78 of file Matrix.H.
Referenced by Matrix< RectangularMatrix< Type >, Type >::transfer().
|
private |
Row pointers.
Definition at line 81 of file Matrix.H.
Referenced by Matrix< RectangularMatrix< Type >, Type >::transfer().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.