OS  2.9.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OSMatrix.h
Go to the documentation of this file.
1 /* $Id: OSMatrix.h 3172 2010-02-05 04:59:24Z Gassmann $ */
15 #ifndef OSMATRIX_H
16 #define OSMATRIX_H
17 
18 #include "OSConfig.h"
19 #include "OSParameters.h"
20 #include "OSnLNode.h"
21 #include "OSExpressionTree.h"
22 
23 #include <string>
24 #include <vector>
25 
26 
27 /*********************************************************************************
28  *
29  * This file contains a number of classes to represent a matrix
30  * This construct is new to OS starting June 2014 (trunk version 4811)
31  *
32  *********************************************************************************/
33 
40 class OSnLNode;
41 class OSnLMNode;
43 
44 
51 {
52 public:
58 
63 
68  unsigned int inumberOfChildren;
69 
75 
77  MatrixNode();
78 
80  virtual ~MatrixNode();
81 
86 
90  virtual std::string getNodeName() = 0;
91 
100  virtual std::string getMatrixNodeInXML() = 0;
101 
110  std::vector<MatrixNode*> getPrefixFromNodeTree();
111 
112  /*
113  * <p>
114  * Called by getPrefixFromNodeTree().
115  * This method calls itself recursively and
116  * generates a vector of pointers to MatrixNode in prefix
117  * </p>
118  * @param a pointer prefixVector to a vector of pointers of MatrixNodes
119  * @return a vector of pointers to MatrixNode in prefix.
120  */
121  std::vector<MatrixNode*> preOrderMatrixNodeTraversal( std::vector<MatrixNode*> *prefixVector);
122 
131  std::vector<MatrixNode*> getPostfixFromNodeTree();
132 
142  std::vector<MatrixNode*> postOrderMatrixNodeTraversal( std::vector<MatrixNode*> *postfixVector);
143 
151  virtual MatrixNode *cloneMatrixNode() = 0;
152 
156  virtual bool IsEqual(MatrixNode *that);
157 
166  bool setRandom(double density, bool conformant, int iMin, int iMax);
167 
173  bool deepCopyFrom(MatrixNode *that);
174 };//end MatrixNode
175 
176 
190 {
191 public:
194 
197 
202  bool IsEqual(MatrixConstructor *that);
203 
212  bool setRandom(double density, bool conformant, int iMin, int iMax);
213 
219  bool deepCopyFrom(MatrixConstructor *that);
220 };//class MatrixConstructor
221 
222 
227 {
228 public:
233  bool rowMajor;
234 
240 
245 
249 
250 
253 
258  bool IsEqual(ConstantMatrixElements *that);
259 
268  bool setRandom(double density, bool conformant, int iMin, int iMax);
269 
276 };//class ConstantMatrixElements
277 
283 {
284 public:
290 
295  bool rowMajor;
296 
301 
305 
308 
313 
322  bool setRandom(double density, bool conformant, int iMin, int iMax);
323 
330 };//class VarReferenceMatrixElements
331 
332 
339 {
340 public:
341  int idx;
342  double coef;
343 
346 
350  bool IsEqual(LinearMatrixElementTerm *that);
351 
360  bool setRandom(double density, bool conformant, int iMin, int iMax);
361 
368 };//class LinearMatrixElementTerm
369 
377 {
378 public:
380  double constant;
381 
383 
386 
390  bool IsEqual(LinearMatrixElement *that);
391 
400  bool setRandom(double density, bool conformant, int iMin, int iMax);
401 
407  bool deepCopyFrom(LinearMatrixElement *that);
408 };//class LinearMatrixElement
409 
410 
415 {
416 public:
419 
422 
427  bool IsEqual(LinearMatrixValues *that);
428 
438  bool setRandom(double density, bool conformant, int iMin, int iMax);
439 
445  bool deepCopyFrom(LinearMatrixValues *that);
446 };//class LinearMatrixValues
447 
448 #if 0
449 
452 class LinearMatrixNonzeros
453 {
454 public:
459  //int numberOfEl;
460 
462  IntVector *indexes;
463 
469  LinearMatrixValues *values;
470 
471  LinearMatrixNonzeros();
472  ~LinearMatrixNonzeros();
473 
477  bool IsEqual(LinearMatrixNonzeros *that);
478 
487  bool setRandom(double density, bool conformant, int iMin, int iMax);
488 
494  bool deepCopyFrom(LinearMatrixNonzeros *that);
495 };//class LinearMatrixNonzeros
496 #endif
497 
502 {
503 public:
509 
514  bool rowMajor;
515 
520 
525 
532 
535 
540  bool IsEqual(LinearMatrixElements *that);
541 
550  bool setRandom(double density, bool conformant, int iMin, int iMax);
551 
558 };//class LinearMatrixElements
559 
560 
565 {
566 public:
569 
572 
577  bool IsEqual(GeneralMatrixValues *that);
578 
588  bool setRandom(double density, bool conformant, int iMin, int iMax);
589 
595  bool deepCopyFrom(GeneralMatrixValues *that);
596 };//class GeneralMatrixValues
597 
602 {
603 public:
609 
614  bool rowMajor;
615 
620 
625 
630 
633 
637  bool IsEqual(GeneralMatrixElements *that);
638 
647  bool setRandom(double density, bool conformant, int iMin, int iMax);
648 
655 };//class GeneralMatrixElements
656 
657 
663 {
664 public:
670 
675  bool rowMajor;
676 
681 
685 
688 
694 
703  bool setRandom(double density, bool conformant, int iMin, int iMax);
704 
711 };//class ObjReferenceMatrixElements
712 
713 
719 {
720 public:
726 
731  bool rowMajor;
732 
737 
741 
744 
750 
759  bool setRandom(double density, bool conformant, int iMin, int iMax);
760 
767 };//class ConReferenceMatrixElements
768 
769 
774 {
775 public:
782 
783  MatrixElements();
784  virtual ~MatrixElements();
785 
790 
794  virtual std::string getNodeName();
795 
796 
801  virtual MatrixElements *cloneMatrixNode();
802 
808 
812  bool IsEqual(MatrixElements *that);
813 
822  virtual std::string getMatrixNodeInXML();
823 
832  bool setRandom(double density, bool conformant, int iMin, int iMax);
833 
839  bool deepCopyFrom(MatrixElements *that);
840 };//class MatrixElements
841 
842 
848 {
849 public:
851 
854 
859 
863  virtual std::string getNodeName();
864 
865 
874  virtual std::string getMatrixNodeInXML();
875 
881 
886  bool IsEqual(MatrixTransformation *that);
887 
896  bool setRandom(double density, bool conformant, int iMin, int iMax);
897 
904 };//class MatrixTransformation
905 
906 class MatrixBlock; //forward desclaration
907 
914 {
915 public:
921 
926 
932 
935 
936  MatrixBlocks();
937  ~MatrixBlocks();
938 
943 
947  virtual std::string getNodeName();
948 
949 
958  virtual std::string getMatrixNodeInXML();
959 
964  virtual MatrixBlocks *cloneMatrixNode();
965 
969  bool IsEqual(MatrixBlocks *that);
970 
979  bool setRandom(double density, bool conformant, int iMin, int iMax);
980 
986  bool deepCopyFrom(MatrixBlocks *that);
987 };//class MatrixBlocks
988 
989 
995 {
996 public:
1001 
1007 
1014 
1021 
1026 
1031 
1032 
1033  BaseMatrix();
1034  ~BaseMatrix();
1035 
1040 
1044  virtual std::string getNodeName();
1045 
1046 
1055  virtual std::string getMatrixNodeInXML();
1056 
1061  virtual BaseMatrix *cloneMatrixNode();
1062 
1067  bool IsEqual(BaseMatrix *that);
1068 
1078  bool setRandom(double density, bool conformant, int iMin, int iMax);
1079 
1086  bool deepCopyFrom(BaseMatrix *that);
1087 };//class BaseMatrix
1088 
1089 
1094 class MatrixType : public MatrixNode
1095 {
1096 public:
1100 
1101  MatrixType();
1102  ~MatrixType();
1103 
1108  bool IsEqual(MatrixType *that);
1109 
1119  bool setRandom(double density, bool conformant, int iMin, int iMax);
1120 
1127  bool deepCopyFrom(MatrixType *that);
1128 
1129 };// class MatrixType
1130 
1131 
1132 
1137 class OSMatrix : public MatrixType
1138 {
1139 public:
1140  int idx;
1141  std::string name;
1142 
1143  OSMatrix();
1144  ~OSMatrix();
1145 
1156  OSMatrix* createConstructorTreeFromPrefix(std::vector<MatrixNode*> mtxConstructorVec);
1157 
1162 
1166  virtual std::string getNodeName();
1167 
1187  bool setMatrix(std::string name, int numberOfRows, int numberOfColumns,
1189  unsigned int inumberOfChildren, MatrixNode **m_mChildren);
1190 
1191 
1200  virtual std::string getMatrixNodeInXML();
1201 
1206  virtual OSMatrix *cloneMatrixNode();
1207 
1212  bool IsEqual(OSMatrix *that);
1213 
1223  bool setRandom(double density, bool conformant, int iMin, int iMax);
1224 
1230  bool deepCopyFrom(OSMatrix *that);
1231 
1232 };// class OSMatrix
1233 
1234 
1239 class MatrixBlock : public MatrixType
1240 {
1241 public:
1244 
1245  MatrixBlock();
1246  ~MatrixBlock();
1247 
1252 
1256  virtual std::string getNodeName();
1257 
1258 
1267  virtual std::string getMatrixNodeInXML();
1268 
1273  virtual MatrixBlock *cloneMatrixNode();
1274 
1279  bool IsEqual(MatrixBlock *that);
1280 
1290  bool setRandom(double density, bool conformant, int iMin, int iMax);
1291 
1297  bool deepCopyFrom(MatrixBlock *that);
1298 };// class MatrixBlock
1299 
1300 
1301 #endif
virtual std::string getNodeName()
bool rowMajor
To indicate whether the general matrix elements are stored in row major form or column major form...
Definition: OSMatrix.h:614
virtual MatrixTransformation * cloneMatrixNode()
The implementation of the virtual functions.
bool deepCopyFrom(MatrixBlocks *that)
A function to make a deep copy of an instance of this class.
ObjReferenceMatrixElements * objReferenceElements
Definition: OSMatrix.h:780
bool deepCopyFrom(BaseMatrix *that)
A function to make a deep copy of an instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int baseMatrixIdx
the index of the base matrix
Definition: OSMatrix.h:1000
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
ScalarExpressionTree ** el
Definition: OSMatrix.h:568
a double vector data structure
Definition: OSGeneral.h:609
bool IsEqual(MatrixTransformation *that)
A function to check for the equality of two objects.
bool deepCopyFrom(MatrixElements *that)
A function to make a deep copy of an instance of this class.
IntVector * indexes
The indexes of the (nonzero) linear matrix elements row or column indexes, depending on rowMajor...
Definition: OSMatrix.h:524
bool IsEqual(MatrixBlocks *that)
A function to check for the equality of two objects.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(MatrixNode *that)
A function to make a deep copy of an instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int idx
Definition: OSMatrix.h:1140
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
a data structure to represent the nonzeroes of a matrix explicitly element by element ...
Definition: OSMatrix.h:773
bool rowMajor
To indicate whether the varReference matrix elements are stored in row major form or column major for...
Definition: OSMatrix.h:295
The OSnLMNode Class for nonlinear expressions involving matrices.
Definition: OSnLNode.h:1765
double scalarMultiplier
to allow the base matrix to be scaled before it is attached to the target matrix
Definition: OSMatrix.h:1030
a data structure to represent a MatrixType object (from which we derive OSMatrix and MatrixBlock) ...
Definition: OSMatrix.h:1094
ConstantMatrixElements * constantElements
Definition: OSMatrix.h:776
virtual ~MatrixNode()
destructor
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
virtual std::string getMatrixNodeInXML()
int baseMatrixStartRow
to select the position of the upper left corner of the portion of the base matrix that is to be selec...
Definition: OSMatrix.h:1012
bool setMatrix(std::string name, int numberOfRows, int numberOfColumns, ENUM_MATRIX_SYMMETRY symmetry, ENUM_MATRIX_TYPE matrixType, unsigned int inumberOfChildren, MatrixNode **m_mChildren)
add values to this matrix.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
IntVector * indexes
The row (or column) indices and variable references of the elements.
Definition: OSMatrix.h:303
a data structure to represent the linear expressions in a LinearMatrixElement object ...
Definition: OSMatrix.h:414
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool rowMajor
To indicate whether the linear matrix elements are stored in row major form or column major form...
Definition: OSMatrix.h:514
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
MatrixNode()
default constructor
ENUM_MATRIX_SYMMETRY
Definition: OSParameters.h:698
bool deepCopyFrom(MatrixBlock *that)
A function to make a deep copy of an instance of this class.
int baseMatrixEndCol
Definition: OSMatrix.h:1020
bool deepCopyFrom(LinearMatrixValues *that)
A function to make a deep copy of an instance of this class.
virtual std::string getMatrixNodeInXML()
bool IsEqual(BaseMatrix *that)
A function to check for the equality of two objects.
LinearMatrixElements * linearElements
Definition: OSMatrix.h:778
bool deepCopyFrom(VarReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
int targetMatrixFirstCol
Definition: OSMatrix.h:1006
int numberOfBlocks
This integer gives the number of blocks for which values are provided Due to block-sparsity, this could be less than card(colOffsets)*card(rowOffsets)
Definition: OSMatrix.h:931
virtual OSMatrix * cloneMatrixNode()
The implementation of the virtual functions.
ENUM_MATRIX_SYMMETRY symmetry
Definition: OSMatrix.h:1099
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int baseMatrixStartCol
Definition: OSMatrix.h:1013
bool deepCopyFrom(OSMatrix *that)
A function to make a deep copy of an instance of this class.
IntVector * indexes
The row (or column) indices and objective references of the elements.
Definition: OSMatrix.h:683
bool deepCopyFrom(MatrixTransformation *that)
A function to make a deep copy of an instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
a data structure to represent the nonzero values in a linearMatrix element
Definition: OSMatrix.h:501
virtual std::string getMatrixNodeInXML()
std::vector< MatrixNode * > getPrefixFromNodeTree()
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
Definition: OSMatrix.h:725
virtual MatrixBlock * cloneMatrixNode()
The implementation of the virtual functions.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(ObjReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
LinearMatrixElementTerm ** varIdx
Definition: OSMatrix.h:382
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
LinearMatrixElement ** el
Definition: OSMatrix.h:418
int blockColIdx
Definition: OSMatrix.h:1243
bool IsEqual(LinearMatrixElement *that)
A function to check for the equality of two objects.
bool deepCopyFrom(ConstantMatrixElements *that)
A function to make a deep copy of an instance of this class.
IntVector * start
A vector listing the row or column starts.
Definition: OSMatrix.h:619
virtual std::string getNodeName()
LinearMatrixValues * values
The values are expressions of the form a_0 + a_1 x_{i_1} * a_2 x_{i_2} + ...
Definition: OSMatrix.h:531
ConReferenceMatrixElements * conReferenceElements
Definition: OSMatrix.h:781
bool deepCopyFrom(LinearMatrixElementTerm *that)
A function to make a deep copy of an instance of this class.
Used to hold part of the instance in memory.
virtual std::string getNodeName()
virtual std::string getNodeName()=0
MatrixConstructor()
constructor
a data structure to represent constraint reference elements in a MatrixType object Each nonzero eleme...
Definition: OSMatrix.h:718
bool rowMajor
To indicate whether the objReference matrix elements are stored in row major form or column major for...
Definition: OSMatrix.h:675
bool rowMajor
To indicate whether the constant matrix elements are stored in row major form or column major form...
Definition: OSMatrix.h:233
int numberOfRows
Definition: OSMatrix.h:1097
IntVector * indexes
The indices and values of the (nonzero) constant elements.
Definition: OSMatrix.h:247
IntVector * start
A vector listing the row or column starts.
Definition: OSMatrix.h:680
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
IntVector * indexes
The indexes of the (nonzero) linear matrix elements row or column indexes, depending on rowMajor...
Definition: OSMatrix.h:624
bool IsEqual(MatrixType *that)
A function to check for the equality of two objects.
MatrixBlock ** block
The nonzeros in each block are held in this data structure.
Definition: OSMatrix.h:934
virtual std::string getNodeName()
a data structure to represent the nonzeroes of a matrix in a blockwise fashion.
Definition: OSMatrix.h:913
unsigned int inumberOfChildren
inumberOfChildren is the number of MatrixNode child elements For the matrix types (OSMatrix and Matri...
Definition: OSMatrix.h:68
int baseMatrixEndRow
to select the position of the lower right corner of the portion of the base matrix that is to be sele...
Definition: OSMatrix.h:1019
MatrixNode ** m_mChildren
m_mChildren holds all the children, that is, nodes used in the definition or construction of the curr...
Definition: OSMatrix.h:74
OSnLMNode * transformation
Definition: OSMatrix.h:850
virtual std::string getNodeName()
bool rowMajor
To indicate whether the conReference matrix elements are stored in row major form or column major for...
Definition: OSMatrix.h:731
a data structure to represent the constant elements in a MatrixType object
Definition: OSMatrix.h:226
virtual std::string getMatrixNodeInXML()
a data structure to represent variable reference elements in a MatrixType object Each nonzero element...
Definition: OSMatrix.h:282
bool IsEqual(ObjReferenceMatrixElements *that)
A function to check for the equality of two objects.
OSMatrix * createConstructorTreeFromPrefix(std::vector< MatrixNode * > mtxConstructorVec)
a data structure to represent a point of departure for constructing a matrix by modifying parts of a ...
Definition: OSMatrix.h:994
a data structure to represent the nonzeros in a generalMatrix element
Definition: OSMatrix.h:564
a data structure to represent an expression in a linearMatrix element A LinearMatrixElement is a (fin...
Definition: OSMatrix.h:376
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
IntVector * start
A vector listing the row or column starts.
Definition: OSMatrix.h:244
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool IsEqual(GeneralMatrixElements *that)
A function to check for the equality of two objects.
bool deepCopyFrom(GeneralMatrixValues *that)
A function to make a deep copy of an instance of this class.
virtual bool IsEqual(MatrixNode *that)
A function to check for the equality of two objects.
an integer Vector data structure
Definition: OSGeneral.h:469
IntVector * colOffsets
An array listing the leftmost column of each block within the larger matrix It is assumed that the bl...
Definition: OSMatrix.h:920
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
Definition: OSMatrix.h:50
bool deepCopyFrom(LinearMatrixElements *that)
A function to make a deep copy of an instance of this class.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
Definition: OSMatrix.h:669
a data structure to represent objective reference elements in a MatrixType object Each nonzero elemen...
Definition: OSMatrix.h:662
MatrixElements * copyNodeAndDescendants()
make a copy of this node and all its descendants
virtual BaseMatrix * cloneMatrixNode()
The implementation of the virtual functions.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
ENUM_MATRIX_TYPE matrixType
matrixType tracks the type of elements contained in this MatrixNode, which may be useful in solver se...
Definition: OSMatrix.h:57
bool IsEqual(MatrixElements *that)
A function to check for the equality of two objects.
bool deepCopyFrom(MatrixConstructor *that)
A function to make a deep copy of an instance of this class.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
Definition: OSMatrix.h:239
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool IsEqual(MatrixConstructor *that)
A function to check for the equality of two objects.
DoubleVector * values
Definition: OSMatrix.h:248
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
bool IsEqual(OSMatrix *that)
A function to check for the equality of two objects.
int numberOfColumns
Definition: OSMatrix.h:1098
IntVector * start
A vector listing the row or column starts.
Definition: OSMatrix.h:519
IntVector * start
A vector listing the row or column starts.
Definition: OSMatrix.h:736
virtual std::string getNodeName()
virtual std::string getMatrixNodeInXML()=0
GeneralMatrixElements * generalElements
Definition: OSMatrix.h:779
IntVector * start
A vector listing the row or column starts.
Definition: OSMatrix.h:300
virtual std::string getMatrixNodeInXML()
a data structure to represent the nonzeroes of a matrix by transformation from other (previously defi...
Definition: OSMatrix.h:847
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
Definition: OSMatrix.h:508
ENUM_MATRIX_CONSTRUCTOR_TYPE
Definition: OSParameters.h:739
ENUM_MATRIX_TYPE
An enum to track the many different types of values that a matrix can contain Note that these types a...
Definition: OSParameters.h:596
bool deepCopyFrom(GeneralMatrixElements *that)
A function to make a deep copy of an instance of this class.
bool deepCopyFrom(MatrixType *that)
A function to make a deep copy of an instance of this class.
This file defines the OSnLNode class along with its derived classes.
std::string name
Definition: OSMatrix.h:1141
bool deepCopyFrom(ConReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
std::vector< MatrixNode * > preOrderMatrixNodeTraversal(std::vector< MatrixNode * > *prefixVector)
virtual MatrixBlocks * cloneMatrixNode()
The implementation of the virtual functions.
bool IsEqual(ConReferenceMatrixElements *that)
A function to check for the equality of two objects.
GeneralMatrixValues * values
The values are general nonlinear expressions.
Definition: OSMatrix.h:629
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
Definition: OSMatrix.h:608
IntVector * indexes
The row (or column) indices and constraint references of the elements.
Definition: OSMatrix.h:739
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(LinearMatrixElement *that)
A function to make a deep copy of an instance of this class.
bool IsEqual(LinearMatrixValues *that)
A function to check for the equality of two objects.
a data structure to represent the nonzero values in a generalMatrix element
Definition: OSMatrix.h:601
a data structure to represent a MatrixBlock object (derived from MatrixType)
Definition: OSMatrix.h:1239
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool IsEqual(GeneralMatrixValues *that)
A function to check for the equality of two objects.
bool IsEqual(LinearMatrixElementTerm *that)
A function to check for the equality of two objects.
virtual MatrixElements * cloneMatrixNode()
The implementation of the virtual functions.
std::vector< MatrixNode * > getPostfixFromNodeTree()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
a data structure to represent a matrix object (derived from MatrixType)
Definition: OSMatrix.h:1137
virtual ~MatrixElements()
IntVector * rowOffsets
An array listing the top row of each block within the larger matrix.
Definition: OSMatrix.h:925
bool IsEqual(ConstantMatrixElements *that)
A function to check for the equality of two objects.
bool baseTranspose
to allow the base matrix to be transposed before it is attached to the target matrix ...
Definition: OSMatrix.h:1025
virtual std::string getMatrixNodeInXML()
a data structure to describe one step in the construction of a matrix.
Definition: OSMatrix.h:189
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
a data structure to represent a term in a linearMatrix element A term has the form c*x_{k}...
Definition: OSMatrix.h:338
ENUM_MATRIX_CONSTRUCTOR_TYPE nType
nType is a unique integer assigned to each type of matrix node
Definition: OSMatrix.h:62
int blockRowIdx
Definition: OSMatrix.h:1242
std::vector< MatrixNode * > postOrderMatrixNodeTraversal(std::vector< MatrixNode * > *postfixVector)
VarReferenceMatrixElements * varReferenceElements
Definition: OSMatrix.h:777
bool IsEqual(VarReferenceMatrixElements *that)
A function to check for the equality of two objects.
virtual MatrixNode * cloneMatrixNode()=0
int targetMatrixFirstRow
to pinpoint the position of the upper left corner of the base matrix within the target matrix ...
Definition: OSMatrix.h:1005
bool IsEqual(LinearMatrixElements *that)
A function to check for the equality of two objects.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros ...
Definition: OSMatrix.h:289
The OSnLNode Class for nonlinear expressions.
Definition: OSnLNode.h:192
bool IsEqual(MatrixBlock *that)
A function to check for the equality of two objects.
~MatrixConstructor()
destructor