Public Member Functions | List of all members
SymmetricSquareMatrix< Type > Class Template Reference

A templated 2D square symmetric matrix of objects of <T>, where the n x n matrix dimension is known and used for subscript bounds checking, etc. More...

Inheritance diagram for SymmetricSquareMatrix< Type >:
Inheritance graph
[legend]
Collaboration diagram for SymmetricSquareMatrix< Type >:
Collaboration graph
[legend]

Public Member Functions

 SymmetricSquareMatrix ()
 Null constructor. More...
 
 SymmetricSquareMatrix (const label n)
 Construct given number of rows/columns. More...
 
 SymmetricSquareMatrix (const label m, const label n)
 Construct with given number of rows/columns. More...
 
 SymmetricSquareMatrix (const label m, const label n, const Type &)
 Construct with given number of rows/columns. More...
 
 SymmetricSquareMatrix (Istream &)
 Construct from Istream. More...
 
autoPtr< SymmetricSquareMatrix< Type > > clone () const
 Clone. More...
 
Type & operator() (const label r, const label c)
 Return subscript-checked row of Matrix. More...
 
const Type & operator() (const label r, const label c) const
 Return subscript-checked row of constant Matrix. More...
 
- Public Member Functions inherited from Matrix< SymmetricSquareMatrix< Type >, Type >
 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< SymmetricSquareMatrix< Type >, Type > &)
 Copy constructor. More...
 
 Matrix (Istream &)
 Construct from Istream. More...
 
autoPtr< Matrix< SymmetricSquareMatrix< Type >, 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< SymmetricSquareMatrix< Type >, Type > &)
 Transfer the contents of the argument Matrix into this Matrix. More...
 
SymmetricSquareMatrix< Type > 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< SymmetricSquareMatrix< Type >, Type > &)
 Assignment operator. Takes linear time. More...
 
void operator= (const Type &)
 Assignment of all entries to the given value. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Matrix< SymmetricSquareMatrix< Type >, Type >
static const Matrix< SymmetricSquareMatrix< Type >, Type > & null ()
 Return a null Matrix. More...
 

Detailed Description

template<class Type>
class Foam::SymmetricSquareMatrix< Type >

A templated 2D square symmetric matrix of objects of <T>, where the n x n matrix dimension is known and used for subscript bounds checking, etc.

Source files

Definition at line 51 of file SymmetricSquareMatrix.H.

Constructor & Destructor Documentation

Null constructor.

Definition at line 29 of file SymmetricSquareMatrixI.H.

Referenced by SymmetricSquareMatrix< Type >::SymmetricSquareMatrix().

Here is the caller graph for this function:

SymmetricSquareMatrix ( const label  n)
inline

Construct given number of rows/columns.

Definition at line 36 of file SymmetricSquareMatrixI.H.

References SymmetricSquareMatrix< Type >::SymmetricSquareMatrix().

Here is the call graph for this function:

SymmetricSquareMatrix ( const label  m,
const label  n 
)
inline

Construct with given number of rows/columns.

Definition at line 44 of file SymmetricSquareMatrixI.H.

References Foam::exit(), Foam::FatalError, FatalErrorIn, and SymmetricSquareMatrix< Type >::SymmetricSquareMatrix().

Here is the call graph for this function:

SymmetricSquareMatrix ( const label  m,
const label  n,
const Type &  t 
)
inline

Construct with given number of rows/columns.

and value for all elements.

Definition at line 65 of file SymmetricSquareMatrixI.H.

References Foam::exit(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

SymmetricSquareMatrix ( Istream is)
inline

Construct from Istream.

Definition at line 86 of file SymmetricSquareMatrixI.H.

Member Function Documentation

Foam::autoPtr< Foam::SymmetricSquareMatrix< Type > > clone ( ) const
inline
Type & operator() ( const label  r,
const label  c 
)
inline

Return subscript-checked row of Matrix.

Definition at line 105 of file SymmetricSquareMatrixI.H.

References Foam::constant::universal::c, Matrix< SymmetricSquareMatrix< Type >, Type >::operator, and Matrix< SymmetricSquareMatrix< Type >, Type >::operator[]().

Here is the call graph for this function:

const Type & operator() ( const label  r,
const label  c 
) const
inline

Return subscript-checked row of constant Matrix.

Definition at line 123 of file SymmetricSquareMatrixI.H.

References Foam::constant::universal::c, and Matrix< SymmetricSquareMatrix< Type >, Type >::operator[]().

Here is the call graph for this function:


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