#include <IpMatrix.hpp>
For each Matrix implementation, a corresponding MatrixSpace has to be implemented. A MatrixSpace is able to create new Matrices of a specific type. The MatrixSpace should also store information that is common to all Matrices of that type. For example, the dimensions of a Matrix is stored in the MatrixSpace base class.
Public Member Functions | |
virtual Matrix * | MakeNew () const =0 |
Pure virtual method for creating a new Matrix of the corresponding type. | |
Index | NRows () const |
Accessor function for the number of rows. | |
Index | NCols () const |
Accessor function for the number of columns. | |
bool | IsMatrixFromSpace (const Matrix &matrix) const |
Method to test if a given matrix belongs to a particular matrix space. | |
Constructors/Destructors | |
MatrixSpace (Index nRows, Index nCols) | |
Constructor, given the number rows and columns of all matrices generated by this MatrixSpace. | |
virtual | ~MatrixSpace () |
Destructor. |
MatrixSpace | ( | Index | nRows, | |
Index | nCols | |||
) |
Constructor, given the number rows and columns of all matrices generated by this MatrixSpace.
~MatrixSpace | ( | ) | [virtual] |
Destructor.
virtual Matrix* MakeNew | ( | ) | const [pure virtual] |
Pure virtual method for creating a new Matrix of the corresponding type.
Implemented in CompoundMatrixSpace, DenseGenMatrixSpace, ExpansionMatrixSpace, GenTMatrixSpace, MultiVectorMatrixSpace, ScaledMatrixSpace, SumMatrixSpace, SymMatrixSpace, SymScaledMatrixSpace, and ZeroMatrixSpace.
Index NRows | ( | ) | const [inline] |
Accessor function for the number of rows.
Referenced by SymMatrixSpace::Dim(), ExpansionMatrixSpace::ExpansionMatrixSpace(), CompoundSymMatrixSpace::SetCompSpace(), and CompoundMatrixSpace::SetCompSpace().
Index NCols | ( | ) | const [inline] |
Accessor function for the number of columns.
Referenced by SymMatrixSpace::Dim(), ExpansionMatrixSpace::ExpansionMatrixSpace(), CompoundSymMatrixSpace::SetCompSpace(), and CompoundMatrixSpace::SetCompSpace().
bool IsMatrixFromSpace | ( | const Matrix & | matrix | ) | const |
Method to test if a given matrix belongs to a particular matrix space.
References Matrix::OwnerSpace().