A templated (m x n) matrix of objects of <T>. More...

Public Types | |
| typedef Matrix< Form, Type > | mType |
| Matrix type. More... | |
| typedef Type | cmptType |
| Component type. More... | |
Public Member Functions | |
| Matrix () | |
| Null constructor. More... | |
| Matrix (const label m, const label n) | |
| Construct given number of rows and columns. More... | |
| Matrix (const label m, const label n, const zero) | |
| Construct with given number of rows and columns. More... | |
| Matrix (const label m, const label n, const Type &) | |
| Construct with given number of rows and columns. More... | |
| template<class InputIterator > | |
| Matrix (const label m, const label n, InputIterator first, InputIterator last) | |
| Construct with given number of rows and columns. More... | |
| Matrix (const label m, const label n, std::initializer_list< Type >) | |
| Construct with given number of rows and columns and initialiser list. More... | |
| Matrix (std::initializer_list< std::initializer_list< Type >>) | |
| Construct from initialiser list list. More... | |
| Matrix (const mType &) | |
| Copy constructor. More... | |
| template<class Form2 > | |
| Matrix (const Matrix< Form2, Type > &) | |
| Copy constructor from matrix of a different form. More... | |
| template<class MatrixType > | |
| Matrix (const ConstMatrixBlock< MatrixType > &) | |
| Construct from a block of another matrix. More... | |
| template<class MatrixType > | |
| Matrix (const MatrixBlock< MatrixType > &) | |
| Construct from a block of another matrix. More... | |
| template<class MSForm , direction Mrows, direction Ncols> | |
| Matrix (const MatrixSpace< MSForm, Type, Mrows, Ncols > &) | |
| Matrix (Istream &) | |
| Construct from Istream. More... | |
| autoPtr< mType > | clone () const |
| Clone. More... | |
| ~Matrix () | |
| Destructor. More... | |
| label | m () const |
| Return the number of rows. More... | |
| label | n () const |
| Return the number of columns. More... | |
| label | size () const |
| Return the number of elements in matrix (m*n) More... | |
| const Type * | v () const |
| Return element vector of the constant Matrix. More... | |
| Type * | v () |
| Return element vector of the Matrix. More... | |
| ConstMatrixBlock< mType > | block (const label m, const label n, const label mStart, const label nStart) const |
| template<class VectorSpace > | |
| ConstMatrixBlock< mType > | block (const label mStart, const label nStart) const |
| ConstMatrixBlock< mType > | col (const label m, const label rowStart) const |
| ConstMatrixBlock< mType > | col (const label m, const label mStart, const label nStart) const |
| MatrixBlock< mType > | block (const label m, const label n, const label mStart, const label nStart) |
| template<class VectorSpace > | |
| MatrixBlock< mType > | block (const label mStart, const label nStart) |
| MatrixBlock< mType > | col (const label m, const label rowStart) |
| MatrixBlock< mType > | col (const label m, const label mStart, const label nStart) |
| void | checki (const label i) const |
| Check index i is within valid range (0 ... m-1). More... | |
| void | checkj (const label j) const |
| Check index j is within valid range (0 ... n-1). More... | |
| void | clear () |
| Clear the Matrix, i.e. set sizes to zero. More... | |
| void | transfer (mType &) |
| Transfer the contents of the argument Matrix into this Matrix. More... | |
| void | setSize (const label m, const label n) |
| Resize the matrix preserving the elements. More... | |
| void | shallowResize (const label m, const label n) |
| Resize the matrix without reallocating storage (unsafe) 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... | |
| const Type & | operator() (const label i, const label j) const |
| (i, j) const element access operator More... | |
| Type & | operator() (const label i, const label j) |
| (i, j) element access operator More... | |
| void | operator= (const mType &) |
| Assignment operator. Takes linear time. More... | |
| template<class MatrixType > | |
| void | operator= (const ConstMatrixBlock< MatrixType > &) |
| Assignment to a block of another matrix. More... | |
| template<class MatrixType > | |
| void | operator= (const MatrixBlock< MatrixType > &) |
| Assignment to a block of another matrix. More... | |
| void | operator= (const zero) |
| Assignment of all elements to zero. More... | |
| void | operator= (const Type &) |
| Assignment of all elements to the given value. More... | |
| template<class VectorSpace > | |
| Foam::ConstMatrixBlock< Foam::Matrix< Form, Type > > | block (const label mStart, const label nStart) const |
| template<class VectorSpace > | |
| Foam::MatrixBlock< Foam::Matrix< Form, Type > > | block (const label mStart, const label nStart) |
Static Public Member Functions | |
| static const mType & | null () |
| Return a null Matrix. More... | |
Friends | |
| Istream & | operator>> (Istream &, mType &) |
| Read Matrix from Istream, discarding contents of existing Matrix. More... | |
| Ostream & | operator (Ostream &, const mType &) |
| Write Matrix to Ostream. More... | |
A templated (m x n) matrix of objects of <T>.
Construct given number of rows and columns.
Definition at line 44 of file Matrix.C.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Construct with given number of rows and columns.
initialising all elements to zero
Definition at line 62 of file Matrix.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Matrix< Form, Type >::size(), and Foam::Zero.

Construct with given number of rows and columns.
initialising all elements to the given value
Definition at line 89 of file Matrix.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, s(), and Matrix< Form, Type >::size().

| Matrix | ( | std::initializer_list< std::initializer_list< Type >> | lstLst | ) |
Construct from initialiser list list.
Definition at line 173 of file Matrix.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and forAllConstIter.

Copy constructor.
Definition at line 216 of file Matrix.C.
References M, and Matrix< Form, Type >::size().

Copy constructor from matrix of a different form.
Definition at line 237 of file Matrix.C.
References M, and Matrix< Form, Type >::size().

| Matrix | ( | const ConstMatrixBlock< MatrixType > & | Mb | ) |
| Matrix | ( | const MatrixBlock< MatrixType > & | Mb | ) |
| Matrix | ( | const MatrixSpace< MSForm, Type, Mrows, Ncols > & | Ms | ) |
Construct from Istream.
Definition at line 35 of file MatrixIO.C.
References Matrix< Form, Type >::operator>>.
|
inlinestatic |
|
inline |
|
inline |
Return the number of rows.
Definition at line 57 of file MatrixI.H.
Referenced by LLTMatrix< Type >::decompose(), Foam::detDecomposed(), QRMatrix< MatrixType >::inv(), Foam::LUBacksubstitute(), Foam::LUDecompose(), LUscalarMatrix::LUscalarMatrix(), Foam::LUsolve(), simpleMatrix< Type >::operator=(), Foam::outer(), LLTMatrix< Type >::solve(), LUscalarMatrix::solve(), Foam::solve(), SVD::SVD(), and Foam::symmOuter().

|
inline |
Return the number of columns.
Definition at line 64 of file MatrixI.H.
Referenced by LUscalarMatrix::LUscalarMatrix(), Foam::outer(), SVD::SVD(), and Foam::symmOuter().

|
inline |
Return the number of elements in matrix (m*n)
Definition at line 71 of file MatrixI.H.
Referenced by Matrix< Form, Type >::Matrix().

|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Check index i is within valid range (0 ... m-1).
Definition at line 78 of file MatrixI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

|
inline |
Check index j is within valid range (0 ... n-1).
Definition at line 98 of file MatrixI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

| void transfer | ( | mType & | M | ) |
Resize the matrix preserving the elements.
Definition at line 367 of file Matrix.C.
References Foam::min(), n, and Foam::Zero.

| Form T |
Return the transpose of the matrix.
Definition at line 387 of file Matrix.C.
References Foam::saturationModels::A, and n.
Referenced by chemPointISAT::chemPointISAT().

Return subscript-checked row of Matrix.
Definition at line 328 of file MatrixI.H.
Referenced by LUscalarMatrix::LUscalarMatrix().

Assignment operator. Takes linear time.
Definition at line 407 of file Matrix.C.
References Foam::abort(), clear(), Foam::FatalError, FatalErrorInFunction, and M.

| void operator= | ( | const ConstMatrixBlock< MatrixType > & | Mb | ) |
| void operator= | ( | const MatrixBlock< MatrixType > & | Mb | ) |
| void operator= | ( | const | zero | ) |
| void operator= | ( | const Type & | s | ) |
|
inline |
Definition at line 155 of file MatrixI.H.
References VectorSpace< Form, Cmpt, Ncmpts >::mRows, and VectorSpace< Form, Cmpt, Ncmpts >::nCols.
|
inline |
Read Matrix from Istream, discarding contents of existing Matrix.
Referenced by Matrix< Form, Type >::Matrix().