a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock). More...
#include <OSMatrix.h>
Public Member Functions | |
MatrixNode () | |
default constructor More... | |
virtual | ~MatrixNode () |
destructor More... | |
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE | getNodeType () |
virtual ENUM_MATRIX_TYPE | getMatrixType ()=0 |
virtual std::string | getNodeName ()=0 |
virtual std::string | getMatrixNodeInXML ()=0 |
std::vector< MatrixNode * > | getPrefixFromNodeTree () |
std::vector< MatrixNode * > | preOrderMatrixNodeTraversal (std::vector< MatrixNode * > *prefixVector) |
std::vector< MatrixNode * > | getPostfixFromNodeTree () |
std::vector< MatrixNode * > | postOrderMatrixNodeTraversal (std::vector< MatrixNode * > *postfixVector) |
virtual MatrixNode * | cloneMatrixNode ()=0 |
virtual bool | alignsOnBlockBoundary (int firstRow, int firstColumn, int nRows, int nCols)=0 |
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor. More... | |
virtual bool | IsEqual (MatrixNode *that) |
A function to check for the equality of two objects. More... | |
bool | setRandom (double density, bool conformant, int iMin, int iMax) |
A function to make a random instance of this class. More... | |
bool | deepCopyFrom (MatrixNode *that) |
A function to make a deep copy of an instance of this class. More... | |
Public Attributes | |
ENUM_MATRIX_TYPE | matrixType |
matrixType tracks the type of elements contained in this MatrixNode, which may be useful in solver selection For an enumeration of the possible types see OSParameters.h More... | |
ENUM_MATRIX_CONSTRUCTOR_TYPE | nType |
nType is a unique integer assigned to each type of matrix node (see OSParameters.h) More... | |
unsigned int | inumberOfChildren |
inumberOfChildren is the number of MatrixNode child elements For the matrix types (OSMatrix and MatrixBlock) this number is not fixed and is temporarily set to 0 More... | |
MatrixNode ** | m_mChildren |
m_mChildren holds all the children, that is, nodes used in the definition or construction of the current node. More... | |
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
Definition at line 50 of file OSMatrix.h.
MatrixNode::MatrixNode | ( | ) |
default constructor
-------— Methods for class MatrixNode -------—
Definition at line 40 of file OSMatrix.cpp.
|
virtual |
destructor
Definition at line 50 of file OSMatrix.cpp.
|
virtual |
Reimplemented in MatrixBlock, OSMatrix, BaseMatrix, MatrixBlocks, MatrixTransformation, MixedRowReferenceMatrixElements, ConReferenceMatrixElements, ObjReferenceMatrixElements, GeneralMatrixElements, LinearMatrixElements, VarReferenceMatrixElements, and ConstantMatrixElements.
Definition at line 84 of file OSMatrix.cpp.
|
pure virtual |
Implemented in MatrixBlock, OSMatrix, BaseMatrix, MatrixBlocks, MatrixTransformation, MixedRowReferenceMatrixElements, ConReferenceMatrixElements, ObjReferenceMatrixElements, GeneralMatrixElements, LinearMatrixElements, VarReferenceMatrixElements, and ConstantMatrixElements.
|
pure virtual |
Implemented in MatrixBlock, OSMatrix, BaseMatrix, MatrixBlocks, MatrixTransformation, MixedRowReferenceMatrixElements, ConReferenceMatrixElements, ObjReferenceMatrixElements, GeneralMatrixElements, LinearMatrixElements, VarReferenceMatrixElements, and ConstantMatrixElements.
|
pure virtual |
The following method writes a matrix node in OSgL format. it is used by OSgLWriter to write a <matrix> element.
Implemented in MatrixBlock, OSMatrixWithMatrixConIdx, OSMatrixWithMatrixObjIdx, OSMatrixWithMatrixVarIdx, OSMatrix, BaseMatrix, MatrixBlocks, MatrixTransformation, MixedRowReferenceMatrixElements, ConReferenceMatrixElements, ObjReferenceMatrixElements, GeneralMatrixElements, LinearMatrixElements, VarReferenceMatrixElements, and ConstantMatrixElements.
Definition at line 89 of file OSMatrix.cpp.
std::vector<MatrixNode*> MatrixNode::getPrefixFromNodeTree | ( | ) |
Get a vector of pointers to OSnLNodes and OSnLMNodes that correspond to the MatrixNode tree in prefix format.
std::vector<MatrixNode*> MatrixNode::preOrderMatrixNodeTraversal | ( | std::vector< MatrixNode * > * | prefixVector | ) |
std::vector<MatrixNode*> MatrixNode::getPostfixFromNodeTree | ( | ) |
Get a vector of pointers to MatrixNodes that correspond to the MatrixNode tree in postfix format
std::vector<MatrixNode*> MatrixNode::postOrderMatrixNodeTraversal | ( | std::vector< MatrixNode * > * | postfixVector | ) |
Called by getPostfixFromNodeTree(). This method calls itself recursively and generates a vector of pointers to MatrixNodes in postfix.
a | pointer postfixVector to a vector of pointers of MatrixNodes |
|
pure virtual |
Create or clone a node of this type. This is an abstract method which is required to be implemented by the concrete operator nodes that derive or extend from this class.
Implemented in MatrixBlock, OSMatrixWithMatrixConIdx, OSMatrixWithMatrixObjIdx, OSMatrixWithMatrixVarIdx, OSMatrix, BaseMatrix, MatrixBlocks, MatrixTransformation, MixedRowReferenceMatrixElements, ConReferenceMatrixElements, ObjReferenceMatrixElements, GeneralMatrixElements, LinearMatrixElements, VarReferenceMatrixElements, and ConstantMatrixElements.
|
pure virtual |
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
firstRow | gives the number of the first row in the submatrix (zero-based) |
firstColumn | gives the number of the first column in the submatrix (zero-based) |
nRows | gives the number of rows in the submatrix |
nColumns | gives the number of columns in the submatrix |
Implemented in MatrixBlock, OSMatrix, MatrixType, BaseMatrix, MatrixBlocks, MatrixTransformation, MixedRowReferenceMatrixElements, ConReferenceMatrixElements, ObjReferenceMatrixElements, GeneralMatrixElements, LinearMatrixElements, VarReferenceMatrixElements, and ConstantMatrixElements.
Definition at line 94 of file OSMatrix.cpp.
|
virtual |
A function to check for the equality of two objects.
Definition at line 99 of file OSMatrix.cpp.
A function to make a random instance of this class.
density,: | corresponds to the probability that a particular child element is created |
conformant,: | if true enforces side constraints not enforceable in the schema (e.g., agreement of "numberOfXXX" attributes and <XXX> children) |
iMin,: | lowest index value (inclusive) that a variable reference in this matrix can take |
iMax,: | greatest index value (inclusive) that a variable reference in this matrix can take |
bool MatrixNode::deepCopyFrom | ( | MatrixNode * | that | ) |
A function to make a deep copy of an instance of this class.
that,: | the instance from which information is to be copied |
ENUM_MATRIX_TYPE MatrixNode::matrixType |
matrixType tracks the type of elements contained in this MatrixNode, which may be useful in solver selection For an enumeration of the possible types see OSParameters.h
Definition at line 58 of file OSMatrix.h.
ENUM_MATRIX_CONSTRUCTOR_TYPE MatrixNode::nType |
nType is a unique integer assigned to each type of matrix node (see OSParameters.h)
Definition at line 64 of file OSMatrix.h.
unsigned int MatrixNode::inumberOfChildren |
inumberOfChildren is the number of MatrixNode child elements For the matrix types (OSMatrix and MatrixBlock) this number is not fixed and is temporarily set to 0
Definition at line 70 of file OSMatrix.h.
MatrixNode** MatrixNode::m_mChildren |
m_mChildren holds all the children, that is, nodes used in the definition or construction of the current node.
Definition at line 76 of file OSMatrix.h.