My Project
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
40class OSnLNode;
41class OSnLMNode;
43
44
51{
52public:
59
65
70 unsigned int inumberOfChildren;
71
77
79 MatrixNode();
80
82 virtual ~MatrixNode();
83
88
93
97 virtual std::string getNodeName() = 0;
98
107 virtual std::string getMatrixNodeInXML() = 0;
108
117 std::vector<MatrixNode*> getPrefixFromNodeTree();
118
119 /*
120 * <p>
121 * Called by getPrefixFromNodeTree().
122 * This method calls itself recursively and
123 * generates a vector of pointers to MatrixNode in prefix
124 * </p>
125 * @param a pointer prefixVector to a vector of pointers of MatrixNodes
126 * @return a vector of pointers to MatrixNode in prefix.
127 */
128 std::vector<MatrixNode*> preOrderMatrixNodeTraversal( std::vector<MatrixNode*> *prefixVector);
129
138 std::vector<MatrixNode*> getPostfixFromNodeTree();
139
149 std::vector<MatrixNode*> postOrderMatrixNodeTraversal( std::vector<MatrixNode*> *postfixVector);
150
159
171 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols) = 0;
172
176 virtual bool IsEqual(MatrixNode *that);
177
186 bool setRandom(double density, bool conformant, int iMin, int iMax);
187
194};//end MatrixNode
195
196
210{
211public:
214
216 virtual ~MatrixConstructor();
217
222 //bool IsEqual(MatrixConstructor *that);
223
232 //bool setRandom(double density, bool conformant, int iMin, int iMax);
233
239 //bool deepCopyFrom(MatrixConstructor *that);
240};//class MatrixConstructor
241
242
249{
250public:
256
262
267
270
271
273 virtual ~MatrixElements();
274
278 bool getRowMajor();
279
288 //virtual std::string getMatrixElementsInXML() = 0;
289
293 bool IsEqual(MatrixElements *that);
294
295#if 0
304 bool setRandom(double density, bool conformant, int iMin, int iMax);
305
311 bool deepCopyFrom(MatrixElements *that);
312#endif
313};//class MatrixElements
314
315
322{
323public:
328
330 virtual ~MatrixElementValues();
331
340 //virtual std::string getMatrixValuesInXML() = 0;
341
346 //bool IsEqual(MatrixElementValues *that);
347
356 //bool setRandom(double density, bool conformant, int iMin, int iMax);
357
363 virtual bool deepCopyFrom(MatrixElementValues *that);
364};//class MatrixElementValues
365
366// ------------------ concrete classes start here ------------------------------
367
374{
375public:
376 int idx;
377 double coef;
378
381
386
395 bool setRandom(double density, bool conformant, int iMin, int iMax);
396
403};//class LinearMatrixElementTerm
404
412{
413public:
415 double constant;
416
418
421
425 bool IsEqual(LinearMatrixElement *that);
426
435 bool setRandom(double density, bool conformant, int iMin, int iMax);
436
443};//class LinearMatrixElement
444
445
454{
455public:
461
467
469 double value;
470
473
478
487 bool setRandom(double density, bool conformant, int iMin, int iMax);
488
495};//class ConReferenceMatrixElement
496
497
502{
503public:
504 double *el;
505
508
512 //virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType();
513
517 //virtual ENUM_MATRIX_TYPE getMatrixType();
518
522 //virtual std::string getNodeName();
523
532 //virtual std::string getMatrixValuesInXML();
533
538 bool IsEqual(ConstantMatrixValues *that);
539
548 bool setRandom(double density, bool conformant, int iMin, int iMax);
549
556};//class ConstantMatrixValues
557
558
564{
565public:
569 int *el;
570
573
579
588 bool setRandom(double density, bool conformant, int iMin, int iMax);
589
595 virtual bool deepCopyFrom(VarReferenceMatrixValues *that);
596};//class VarReferenceMatrixValues
597
598
603{
604public:
606
609
614 bool IsEqual(LinearMatrixValues *that);
615
625 bool setRandom(double density, bool conformant, int iMin, int iMax);
626
632 virtual bool deepCopyFrom(LinearMatrixValues *that);
633};//class LinearMatrixValues
634
635
640{
641public:
643
646
651 bool IsEqual(GeneralMatrixValues *that);
652
661 bool setRandom(double density, bool conformant, int iMin, int iMax);
662
668 virtual bool deepCopyFrom(GeneralMatrixValues *that);
669};//class GeneralMatrixValues
670
671
676{
677public:
678 int *el;
679
682
688
697 bool setRandom(double density, bool conformant, int iMin, int iMax);
698
704 virtual bool deepCopyFrom(ObjReferenceMatrixValues *that);
705};//class ObjReferenceMatrixValues
706
707
712{
713public:
718
721
726
735 bool setRandom(double density, bool conformant, int iMin, int iMax);
736
742 virtual bool deepCopyFrom(ConReferenceMatrixValues *that);
743};//class ConReferenceMatrixValues
744
745
750{
751public:
754
757
758
763
767 virtual std::string getNodeName();
768
773
782 virtual std::string getMatrixNodeInXML();
783
795 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
796
805
811
820 bool setRandom(double density, bool conformant, int iMin, int iMax);
821
828};//class ConstantMatrixElements
829
830
836{
837public:
840
843
848
853
857 virtual std::string getNodeName();
866 virtual std::string getMatrixNodeInXML();
867
879 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
880
889
894
903 bool setRandom(double density, bool conformant, int iMin, int iMax);
904
911};//class VarReferenceMatrixElements
912
913
918{
919public:
926
929
930
935
940
944 virtual std::string getNodeName();
953 virtual std::string getMatrixNodeInXML();
954
966 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
967
976
981 bool IsEqual(LinearMatrixElements *that);
982
991 bool setRandom(double density, bool conformant, int iMin, int iMax);
992
999};//class LinearMatrixElements
1000
1001
1006{
1007public:
1012
1015
1016
1021
1026
1030 virtual std::string getNodeName();
1039 virtual std::string getMatrixNodeInXML();
1040
1052 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
1053
1062
1066 bool IsEqual(GeneralMatrixElements *that);
1067
1076 bool setRandom(double density, bool conformant, int iMin, int iMax);
1077
1084};//class GeneralMatrixElements
1085
1086
1092{
1093public:
1096
1099
1100
1105
1110
1114 virtual std::string getNodeName();
1115
1124 virtual std::string getMatrixNodeInXML();
1125
1137 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
1138
1147
1153
1162 bool setRandom(double density, bool conformant, int iMin, int iMax);
1163
1170};//class ObjReferenceMatrixElements
1171
1172
1178{
1179public:
1182
1185
1186
1191
1196
1200 virtual std::string getNodeName();
1201
1210 virtual std::string getMatrixNodeInXML();
1211
1223 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
1224
1233
1239
1248 bool setRandom(double density, bool conformant, int iMin, int iMax);
1249
1256};//class ConReferenceMatrixElements
1257
1258
1265{
1266public:
1276
1279
1280
1285
1290
1294 virtual std::string getNodeName();
1295
1306 virtual std::string getMatrixNodeInXML();
1307
1319 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
1320
1329
1334
1343 bool setRandom(double density, bool conformant, int iMin, int iMax);
1344
1351};//class MixedRowReferenceMatrixElements
1352
1353
1359{
1360public:
1365
1371
1374
1379
1383 virtual std::string getNodeName();
1384
1385
1390
1399 virtual std::string getMatrixNodeInXML();
1400
1410 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
1411
1417
1422 bool IsEqual(MatrixTransformation *that);
1423
1432 bool setRandom(double density, bool conformant, int iMin, int iMax);
1433
1440};//class MatrixTransformation
1441
1442//class MatrixBlock; //forward declaration
1443
1450{
1451public:
1457
1462
1463 MatrixBlocks();
1464 ~MatrixBlocks();
1465
1470
1474 virtual std::string getNodeName();
1475
1480
1489 virtual std::string getMatrixNodeInXML();
1490
1500 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols) ;
1501
1506 virtual MatrixBlocks *cloneMatrixNode();
1507
1511 bool IsEqual(MatrixBlocks *that);
1512
1521 bool setRandom(double density, bool conformant, int iMin, int iMax);
1522
1529};//class MatrixBlocks
1530
1531
1537{
1538public:
1543
1548
1554
1561
1568
1573
1578
1580 BaseMatrix();
1581 ~BaseMatrix();
1582
1587
1591 virtual std::string getNodeName();
1592
1597
1606 virtual std::string getMatrixNodeInXML();
1607
1617 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols) ;
1618
1623 virtual BaseMatrix *cloneMatrixNode();
1624
1628 bool IsEqual(BaseMatrix *that);
1629
1630#if 0
1639 bool setRandom(double density, bool conformant, int iMin, int iMax);
1640
1646 bool deepCopyFrom(BaseMatrix *that);
1647#endif
1648};//class BaseMatrix
1649
1650
1655{
1656public:
1657
1663
1669
1675
1681
1687
1692
1697
1702 int* start;
1703
1708 int* index;
1709
1715
1724
1729
1739 GeneralSparseMatrix(bool isColumnMajor, int startSize, int valueSize, ENUM_MATRIX_TYPE type);
1740
1746
1752 bool display(int secondaryDim);
1753
1758 bool isDiagonal();
1759}; //GeneralSparseMatrix
1760
1761
1769{
1770public:
1776
1782
1788
1794
1802
1810
1816
1824
1832
1839
1845
1854 ExpandedMatrixBlocks(bool isColumnMajor_, int startSize, int valueSize);
1855
1861
1867 bool display(int secondaryDim);
1868
1875 GeneralSparseMatrix* getBlock(int rowIdx, int colIdx);
1876
1881 bool isBlockDiagonal();
1882}; //ExpandedMatrixBlocks
1883
1884
1890{
1891public:
1897
1903
1906
1913 std::vector<ExpandedMatrixBlocks*> ExpandedMatrixByBlocks;
1914
1915private:
1920
1925
1930
1935
1940
1945
1946public:
1947 MatrixType();
1948 virtual ~MatrixType();
1949
1950
1954 //virtual bool isDiagonal();
1955
1965 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols) ;
1966
1970 bool matrixHasBase();
1971 bool matrixHasElements();
1973 bool matrixHasBlocks();
1977
1980 GeneralSparseMatrix* getMatrixBlockInColumnMajorForm(int columnIdx, int rowIdx);
1981
1988 bool printExpandedMatrix(bool rowMajor);
1989
1997 int getRowPartitionSize();
1998
2005 int* getRowPartition();
2006
2015
2022 int* getColumnPartition();
2023
2024
2034 virtual bool expandElements(bool rowMajor);
2035
2043 GeneralSparseMatrix* convertToOtherMajor(bool isColumnMajor);
2044
2057 bool processBlockPartition();
2058
2073 virtual bool processBlocks(bool rowMajor, ENUM_MATRIX_SYMMETRY symmetry);
2074
2091 virtual bool processBlocks(int* rowOffset, int rowOffsetSize, int* colOffset,
2092 int colOffsetSize, bool rowMajor, ENUM_MATRIX_SYMMETRY symmetry);
2093
2112 GeneralSparseMatrix* extractBlock(int firstrow, int firstcol, int lastrow, int lastcol,
2113 bool rowMajor, ENUM_MATRIX_SYMMETRY symmetry);
2114
2136 ExpandedMatrixBlocks* getBlocks(int* rowPartition, int rowPartitionSize,
2137 int* colPartition, int colPartitionSize,
2138 bool rowMajor, bool appendToBlockArray);
2139
2152 ExpandedMatrixBlocks* disassembleMatrix(int* rowPartition, int rowPartitionSize,
2153 int* colPartition, int colPartitionSize,
2154 bool rowMajor, ENUM_MATRIX_SYMMETRY symmetry);
2155
2159 bool IsEqual(MatrixType *that);
2160
2169 bool setRandom(double density, bool conformant, int iMin, int iMax);
2170
2178};// class MatrixType
2179
2180
2185class OSMatrix : public MatrixType
2186{
2187public:
2188 int idx;
2189 std::string name;
2190
2191public:
2192 OSMatrix();
2193 ~OSMatrix();
2194
2205 OSMatrix* createConstructorTreeFromPrefix(std::vector<MatrixNode*> mtxConstructorVec);
2206
2211
2215 virtual std::string getNodeName();
2216
2221
2236 //virtual bool processBlocks(int* rowOffset, int* colOffset,
2237 // bool rowMajor, ENUM_MATRIX_SYMMETRY symmetry);
2238
2248 virtual bool expandElements(bool rowMajor);
2249
2259 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols) ;
2260
2265
2285 bool setMatrix(std::string name, int numberOfRows, int numberOfColumns,
2287 unsigned int inumberOfChildren, MatrixNode **m_mChildren);
2288
2289
2298 virtual std::string getMatrixNodeInXML();
2299
2304 virtual OSMatrix *cloneMatrixNode();
2305
2310 bool IsEqual(OSMatrix *that);
2311
2321 bool setRandom(double density, bool conformant, int iMin, int iMax);
2322
2329};// class OSMatrix
2330
2331
2337{
2338public:
2340
2341public:
2344
2353 virtual std::string getMatrixNodeInXML();
2354
2360
2366
2376 bool setRandom(double density, bool conformant, int iMin, int iMax);
2377
2384};// class OSMatrixWithMatrixVarIdx
2385
2386
2392{
2393public:
2395
2396public:
2399
2408 virtual std::string getMatrixNodeInXML();
2409
2415
2421
2431 bool setRandom(double density, bool conformant, int iMin, int iMax);
2432
2439};// class OSMatrixWithMatrixObjIdx
2440
2446{
2447public:
2449
2450public:
2453
2462 virtual std::string getMatrixNodeInXML();
2463
2469
2475
2485 bool setRandom(double density, bool conformant, int iMin, int iMax);
2486
2493};// class OSMatrixWithMatrixConIdx
2494
2495
2501{
2502public:
2505
2506 MatrixBlock();
2507 ~MatrixBlock();
2508
2513
2517 virtual std::string getNodeName();
2518
2519
2524
2533 virtual std::string getMatrixNodeInXML();
2534
2544 virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols);
2545
2555 virtual bool expandElements(bool rowMajor);
2556
2561 virtual MatrixBlock *cloneMatrixNode();
2562
2567 bool IsEqual(MatrixBlock *that);
2568
2578 bool setRandom(double density, bool conformant, int iMin, int iMax);
2579
2585 bool deepCopyFrom(MatrixBlock *that);
2586};// class MatrixBlock
2587
2588
2595ScalarExpressionTree* convertToGeneralMatrixElement(int refIdx, bool varRef); // varref or objref
2599#endif
ConReferenceMatrixElement * convertToConReferenceMatrixElement(int objref)
LinearMatrixElement * convertToLinearMatrixElement(double val)
Some methods to convert one type of matrix element into another.
ScalarExpressionTree * convertToGeneralMatrixElement(double val)
This file defines the OSnLNode class along with its derived classes.
a data structure to represent a point of departure for constructing a matrix by modifying parts of a ...
Definition OSMatrix.h:1537
virtual BaseMatrix * cloneMatrixNode()
The implementation of the virtual functions.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
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:1559
int baseMatrixEndCol
Definition OSMatrix.h:1567
bool IsEqual(BaseMatrix *that)
A function to check for the equality of two objects.
int targetMatrixFirstRow
to pinpoint the position of the upper left corner of the base matrix within the target matrix
Definition OSMatrix.h:1552
double scalarMultiplier
to allow the base matrix to be scaled before it is attached to the target matrix
Definition OSMatrix.h:1577
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
BaseMatrix()
Standard constructor and destructor methods.
virtual std::string getMatrixNodeInXML()
int baseMatrixIdx
the index of the base matrix
Definition OSMatrix.h:1542
OSMatrix * baseMatrix
a pointer to the base matrix
Definition OSMatrix.h:1547
virtual std::string getNodeName()
int baseMatrixStartCol
Definition OSMatrix.h:1560
bool baseTranspose
to allow the base matrix to be transposed before it is attached to the target matrix
Definition OSMatrix.h:1572
virtual ENUM_MATRIX_TYPE getMatrixType()
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:1566
int targetMatrixFirstCol
Definition OSMatrix.h:1553
a data structure to represent an entry in a conReferenceMatrix element, which consists of a constrain...
Definition OSMatrix.h:454
ENUM_CONREFERENCE_VALUETYPE valueType
Several different types of values can be derived from a problem constraint.
Definition OSMatrix.h:466
double value
This element contains the value.
Definition OSMatrix.h:469
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(ConReferenceMatrixElement *that)
A function to make a deep copy of an instance of this class.
ConReferenceMatrixElement()
-------— Methods for class ConReferenceMatrixElement -------—
bool IsEqual(ConReferenceMatrixElement *that)
A function to check for the equality of two objects.
int conReference
contains a reference to a row of the problem (objective if negative, constraint otherwise)
Definition OSMatrix.h:460
a data structure to represent row reference elements in a MatrixType object Each nonzero element is o...
Definition OSMatrix.h:1178
virtual ENUM_MATRIX_TYPE getMatrixType()
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
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.
ConReferenceMatrixValues * value
The constraint references (indexes of core constraints and value types) of the elements.
Definition OSMatrix.h:1181
virtual std::string getNodeName()
bool deepCopyFrom(ConReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
virtual std::string getMatrixNodeInXML()
ConReferenceMatrixElements()
-------— Methods for class ConReferenceMatrixElements -------—
virtual ConReferenceMatrixElements * cloneMatrixNode()
bool IsEqual(ConReferenceMatrixElements *that)
A function to check for the equality of two objects.
a data structure to represent the nonzeros in a conReferenceMatrix element
Definition OSMatrix.h:712
virtual bool deepCopyFrom(ConReferenceMatrixValues *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.
bool IsEqual(ConReferenceMatrixValues *that)
A function to check for the equality of two objects.
ConReferenceMatrixValues()
-------— Methods for class ConReferenceMatrixValues -------—
ConReferenceMatrixElement ** el
el contains the indices of the matrix constraints along with the valueType.
Definition OSMatrix.h:717
a data structure to represent the constant elements in a MatrixType object
Definition OSMatrix.h:750
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
virtual ENUM_MATRIX_TYPE getMatrixType()
ConstantMatrixElements()
-------— Methods for class ConstantMatrixElements -------—
bool IsEqual(ConstantMatrixElements *that)
A function to check for the equality of two objects.
virtual std::string getNodeName()
virtual std::string getMatrixNodeInXML()
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
ConstantMatrixValues * value
The value array of the (nonzero) constant elements.
Definition OSMatrix.h:753
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
virtual ConstantMatrixElements * cloneMatrixNode()
bool deepCopyFrom(ConstantMatrixElements *that)
A function to make a deep copy of an instance of this class.
to represent the nonzeros in a constantMatrix element
Definition OSMatrix.h:502
bool IsEqual(ConstantMatrixValues *that)
A function to check for the equality of two objects.
ConstantMatrixValues()
-------— Methods for class ConstantMatrixValues -------—
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(ConstantMatrixValues *that)
A function to make a deep copy of an instance of this class.
a sparse matrix data structure for matrices that can hold nonconstant values and have block structure...
Definition OSMatrix.h:1769
int blockNumber
blockNumber gives the number of blocks (which is the size of the blockRows and blockColumns arrays).
Definition OSMatrix.h:1793
GeneralSparseMatrix ** blocks
blocks holds the blocks that make up the matrix.
Definition OSMatrix.h:1838
bool display(int secondaryDim)
This method displays data structure in the matrix format.
ENUM_MATRIX_TYPE vType
vType holds the type of all (nonzero) values in the collection of blocks contained in this set of blo...
Definition OSMatrix.h:1781
int * blockRows
blockRows holds an integer array of the row to which a block belongs.
Definition OSMatrix.h:1823
int rowOffsetSize
These two parameters give the size of the rowOffset and colOffset arrays, respectively.
Definition OSMatrix.h:1814
int * colOffset
colOffset gives the column offsets of the block decomposition It does not have to correspond to the c...
Definition OSMatrix.h:1809
bool isRowMajor
isRowMajor holds whether the (nonzero) values holding the data are stored by columnrow.
Definition OSMatrix.h:1787
~ExpandedMatrixBlocks()
Default destructor.
bool isBlockDiagonal()
a method to determine whether the collection is blockDiagonal
int * rowOffset
rowOffset gives the row offsets of the block decomposition It does not have to correspond to the row ...
Definition OSMatrix.h:1801
GeneralSparseMatrix * getBlock(int rowIdx, int colIdx)
a method to retrieve a particular block from a collection
int * blockColumns
blockColumns holds an integer array of the column to which a block belongs.
Definition OSMatrix.h:1831
bool bDeleteArrays
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default
Definition OSMatrix.h:1775
ExpandedMatrixBlocks()
Default constructor.
a data structure to represent the nonzero values in a generalMatrix element
Definition OSMatrix.h:1006
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
virtual std::string getMatrixNodeInXML()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
virtual ENUM_MATRIX_TYPE getMatrixType()
bool deepCopyFrom(GeneralMatrixElements *that)
A function to make a deep copy of an instance of this class.
virtual std::string getNodeName()
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
bool IsEqual(GeneralMatrixElements *that)
A function to check for the equality of two objects.
GeneralMatrixElements()
-------— Methods for class GeneralMatrixElements -------—
virtual GeneralMatrixElements * cloneMatrixNode()
GeneralMatrixValues * value
The values are general nonlinear expressions.
Definition OSMatrix.h:1011
a data structure to represent the nonzeros in a generalMatrix element
Definition OSMatrix.h:640
virtual bool deepCopyFrom(GeneralMatrixValues *that)
A function to make a deep copy of an instance of this class.
GeneralMatrixValues()
-------— Methods for class GeneralMatrixValues -------—
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
ScalarExpressionTree ** el
Definition OSMatrix.h:642
bool IsEqual(GeneralMatrixValues *that)
A function to check for the equality of two objects.
a sparse matrix data structure for matrices that can hold nonconstant values
Definition OSMatrix.h:1655
bool isRowMajor
isRowMajor holds whether the matrix is stored by row.
Definition OSMatrix.h:1680
GeneralSparseMatrix()
Default constructor.
bool b_deleteStartArray
b_deleteStartArray is true if we delete the start array in garbage collection — set to true by defaul...
Definition OSMatrix.h:1662
bool isDiagonal()
a method to determine whether the matrix is diagonal
MatrixElementValues * value
value holds a general array of value elements in the matrix, which could be constants,...
Definition OSMatrix.h:1723
int * index
index holds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix).
Definition OSMatrix.h:1708
bool b_deleteIndexArray
b_deleteIndexArray is true if we delete the index array in garbage collection — set to true by defaul...
Definition OSMatrix.h:1668
bool display(int secondaryDim)
This method displays the data contained in the matrix.
bool b_deleteValueArray
b_deleteValueArray is true if we delete the value array in garbage collection — set to true by defaul...
Definition OSMatrix.h:1674
int * start
start holds an integer array of start elements in the matrix, which points to the start of a column (...
Definition OSMatrix.h:1702
ENUM_MATRIX_SYMMETRY symmetry
To track the type of symmetry present in the matrix or block.
Definition OSMatrix.h:1686
int valueSize
valueSize is the dimension of the index and value arrays
Definition OSMatrix.h:1696
~GeneralSparseMatrix()
Default destructor.
ENUM_MATRIX_TYPE vType
vType holds the type of values found in the value array.
Definition OSMatrix.h:1714
int startSize
startSize is the dimension of the starts array
Definition OSMatrix.h:1691
an integer Vector data structure
Definition OSGeneral.h:470
a data structure to represent an expression in a linearMatrix element A LinearMatrixElement is a (fin...
Definition OSMatrix.h:412
bool IsEqual(LinearMatrixElement *that)
A function to check for the equality of two objects.
LinearMatrixElementTerm ** varIdx
Definition OSMatrix.h:417
LinearMatrixElement()
-------— Methods for class LinearMatrixElement -------—
bool deepCopyFrom(LinearMatrixElement *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 a term in a linearMatrix element A term has the form c*x_{k}...
Definition OSMatrix.h:374
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool deepCopyFrom(LinearMatrixElementTerm *that)
A function to make a deep copy of an instance of this class.
bool IsEqual(LinearMatrixElementTerm *that)
A function to check for the equality of two objects.
LinearMatrixElementTerm()
-------— Methods for class LinearMatrixElementTerm -------—
a data structure to represent the nonzero values in a linearMatrix element
Definition OSMatrix.h:918
virtual ENUM_MATRIX_TYPE getMatrixType()
virtual std::string getNodeName()
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
virtual LinearMatrixElements * cloneMatrixNode()
bool IsEqual(LinearMatrixElements *that)
A function to check for the equality of two objects.
virtual std::string getMatrixNodeInXML()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
LinearMatrixValues * value
The values are expressions of the form a_0 + a_1 x_{i_1} * a_2 x_{i_2} + ... Each term in this sum is...
Definition OSMatrix.h:925
LinearMatrixElements()
-------— Methods for class LinearMatrixElements -------—
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
bool deepCopyFrom(LinearMatrixElements *that)
A function to make a deep copy of an instance of this class.
a data structure to represent the linear expressions in a LinearMatrixElement object
Definition OSMatrix.h:603
virtual bool deepCopyFrom(LinearMatrixValues *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.
bool IsEqual(LinearMatrixValues *that)
A function to check for the equality of two objects.
LinearMatrixValues()
-------— Methods for class LinearMatrixValues -------—
LinearMatrixElement ** el
Definition OSMatrix.h:605
a data structure to represent a MatrixBlock object (derived from MatrixType)
Definition OSMatrix.h:2501
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
bool deepCopyFrom(MatrixBlock *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.
virtual std::string getMatrixNodeInXML()
int blockRowIdx
Definition OSMatrix.h:2503
virtual std::string getNodeName()
int blockColIdx
Definition OSMatrix.h:2504
virtual bool expandElements(bool rowMajor)
A method to expand a matrix or block The result is a GeneralSparseMatrix object of constant matrix el...
bool IsEqual(MatrixBlock *that)
A function to check for the equality of two objects.
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
virtual ENUM_MATRIX_TYPE getMatrixType()
virtual MatrixBlock * cloneMatrixNode()
The implementation of the virtual functions.
MatrixBlock()
-------— Methods for class MatrixBlock -------—
a data structure to represent the nonzeroes of a matrix in a blockwise fashion. Each block can be giv...
Definition OSMatrix.h:1450
virtual std::string getNodeName()
IntVector * colOffset
An array listing the leftmost column of each block within the larger matrix It is assumed that the bl...
Definition OSMatrix.h:1456
virtual ENUM_MATRIX_TYPE getMatrixType()
virtual std::string getMatrixNodeInXML()
bool deepCopyFrom(MatrixBlocks *that)
A function to make a deep copy of an instance of this class.
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
MatrixBlocks()
-------— Methods for class MatrixBlocks -------—
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
virtual MatrixBlocks * cloneMatrixNode()
The implementation of the virtual functions.
bool IsEqual(MatrixBlocks *that)
A function to check for the equality of two objects.
IntVector * rowOffset
An array listing the top row of each block within the larger matrix.
Definition OSMatrix.h:1461
a data structure to describe one step in the construction of a matrix. To facilitate parsing of compl...
Definition OSMatrix.h:210
virtual ~MatrixConstructor()
destructor
Definition OSMatrix.cpp:152
MatrixConstructor()
constructor
Definition OSMatrix.cpp:145
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
Definition OSMatrix.h:322
virtual ~MatrixElementValues()
virtual bool deepCopyFrom(MatrixElementValues *that)
A function to check for the equality of two objects.
MatrixElementValues()
-------— Methods for class MatrixElementValues -------—
int numberOfEl
each type of value is stored as an array named "el".
Definition OSMatrix.h:327
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
Definition OSMatrix.h:249
MatrixElements()
-------— Methods for class MatrixElements -------—
IntVector * start
A vector listing the row or column starts.
Definition OSMatrix.h:266
IntVector * index
The index array of the (nonzero) elements.
Definition OSMatrix.h:269
virtual ~MatrixElements()
bool rowMajor
To indicate whether the matrix elements are stored in row major form or column major form.
Definition OSMatrix.h:255
bool getRowMajor()
Returns whether the matrix is stored row-wise or column-wise.
int numberOfValues
numberOfValues records the number of entries in the arrays that make up the instance of nonzeros
Definition OSMatrix.h:261
bool IsEqual(MatrixElements *that)
A function to check for the equality of two objects.
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements,...
Definition OSMatrix.h:51
std::vector< MatrixNode * > getPrefixFromNodeTree()
virtual bool IsEqual(MatrixNode *that)
A function to check for the equality of two objects.
Definition OSMatrix.cpp:99
std::vector< MatrixNode * > getPostfixFromNodeTree()
virtual ENUM_MATRIX_TYPE getMatrixType()=0
ENUM_MATRIX_TYPE matrixType
matrixType tracks the type of elements contained in this MatrixNode, which may be useful in solver se...
Definition OSMatrix.h:58
unsigned int inumberOfChildren
inumberOfChildren is the number of MatrixNode child elements For the matrix types (OSMatrix and Matri...
Definition OSMatrix.h:70
MatrixNode()
default constructor
Definition OSMatrix.cpp:40
virtual std::string getMatrixNodeInXML()=0
Definition OSMatrix.cpp:89
MatrixNode ** m_mChildren
m_mChildren holds all the children, that is, nodes used in the definition or construction of the curr...
Definition OSMatrix.h:76
std::vector< MatrixNode * > preOrderMatrixNodeTraversal(std::vector< MatrixNode * > *prefixVector)
virtual ~MatrixNode()
destructor
Definition OSMatrix.cpp:50
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.
Definition OSMatrix.cpp:94
std::vector< MatrixNode * > postOrderMatrixNodeTraversal(std::vector< MatrixNode * > *postfixVector)
virtual MatrixNode * cloneMatrixNode()=0
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
Definition OSMatrix.cpp:84
ENUM_MATRIX_CONSTRUCTOR_TYPE nType
nType is a unique integer assigned to each type of matrix node (see OSParameters.h)
Definition OSMatrix.h:64
virtual std::string getNodeName()=0
bool deepCopyFrom(MatrixNode *that)
A function to make a deep copy of an instance of this class.
a data structure to represent the nonzeroes of a matrix by transformation from other (previously defi...
Definition OSMatrix.h:1359
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.
virtual std::string getNodeName()
OSnLMNode * transformation
A transformation is essentially an expression tree that evaluates to a matrix.
Definition OSMatrix.h:1364
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
bool deepCopyFrom(MatrixTransformation *that)
A function to make a deep copy of an instance of this class.
virtual ENUM_MATRIX_TYPE getMatrixType()
MatrixTransformation()
-------— Methods for class MatrixTransformation -------—
bool IsEqual(MatrixTransformation *that)
A function to check for the equality of two objects.
virtual MatrixTransformation * cloneMatrixNode()
The implementation of the virtual functions.
ENUM_NL_EXPR_SHAPE shape
shape can be used to specify linearity etc.
Definition OSMatrix.h:1370
virtual std::string getMatrixNodeInXML()
a data structure to represent a MatrixType object (from which we derive OSMatrix and MatrixBlock)
Definition OSMatrix.h:1890
bool deepCopyFrom(MatrixType *that)
A function to make a deep copy of an instance of this class.
int * m_miRowPartition
m_miRowPartition is the partition vector of the matrix rows into blocks
Definition OSMatrix.h:1919
bool matrixHasElements()
Definition OSMatrix.cpp:201
int numberOfRows
Definition OSMatrix.h:1904
GeneralSparseMatrix * convertToOtherMajor(bool isColumnMajor)
A method to convert a matrix to the other major.
int getNumberOfElementConstructors()
Definition OSMatrix.cpp:236
int m_iRowPartitionSize
m_iRowPartitionSize gives the size of the m_miRowPartition array, which is one more than the number o...
Definition OSMatrix.h:1924
bool IsEqual(MatrixType *that)
A function to check for the equality of two objects.
GeneralSparseMatrix * ExpandedMatrixInColumnMajorForm
Definition OSMatrix.h:1912
MatrixType()
-------— Methods for class MatrixType -------—
Definition OSMatrix.cpp:163
bool m_bHaveRowPartition
m_bHaveRowPartition tracks whether the row partition has been determined from the constructor list an...
Definition OSMatrix.h:1939
int * getColumnPartition()
get the column partition of the matrix
int * getRowPartition()
get the row partition of the matrix
ENUM_MATRIX_SYMMETRY symmetry
To track the type of symmetry present in the matrix or block.
Definition OSMatrix.h:1896
int m_iColumnPartitionSize
m_iColumnPartitionSize gives the size of the m_miColumnPartition array, which is one more than the nu...
Definition OSMatrix.h:1934
bool matrixHasTransformations()
Definition OSMatrix.cpp:216
GeneralSparseMatrix * getMatrixCoefficientsInColumnMajor()
Definition OSMatrix.cpp:274
int getColumnPartitionSize()
get the size of the column partition of a matrix
GeneralSparseMatrix * extractBlock(int firstrow, int firstcol, int lastrow, int lastcol, bool rowMajor, ENUM_MATRIX_SYMMETRY symmetry)
A method to extract a block from a larger matrix The result is a sparse matrix object,...
virtual bool expandElements(bool rowMajor)
A method to expand a matrix or block The result is a GeneralSparseMatrix object of constant matrix el...
ExpandedMatrixBlocks * getBlocks(int *rowPartition, int rowPartitionSize, int *colPartition, int colPartitionSize, bool rowMajor, bool appendToBlockArray)
A method to extract a block from a larger matrix The result is a sparse matrix object,...
int getNumberOfTransformationConstructors()
Definition OSMatrix.cpp:252
int numberOfColumns
Definition OSMatrix.h:1905
int getRowPartitionSize()
get the size of the row partition of a matrix
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
A method to check whether a matrix or block is diagonal.
Definition OSMatrix.cpp:190
virtual bool processBlocks(bool rowMajor, ENUM_MATRIX_SYMMETRY symmetry)
A method to process a matrixType into a block structure defined by the <blocks> element or elements.
bool matrixHasBase()
Several tools to parse the constructor list of a matrix.
Definition OSMatrix.cpp:195
virtual ~MatrixType()
Definition OSMatrix.cpp:183
std::vector< ExpandedMatrixBlocks * > ExpandedMatrixByBlocks
Definition OSMatrix.h:1913
GeneralSparseMatrix * getMatrixBlockInColumnMajorForm(int columnIdx, int rowIdx)
bool matrixHasBlocks()
Definition OSMatrix.cpp:226
ENUM_MATRIX_TYPE type
To track the type of values present in the matrix or block.
Definition OSMatrix.h:1902
GeneralSparseMatrix * getMatrixCoefficientsInRowMajor()
bool m_bHaveColumnPartition
m_bHaveColumnPartition tracks whether the column partition has been determined from the constructor l...
Definition OSMatrix.h:1944
bool processBlockPartition()
A method to determine the block structure of a matrixType as defined by the <blocks> element or eleme...
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int getNumberOfBlocksConstructors()
Definition OSMatrix.cpp:263
int * m_miColumnPartition
m_miColumnPartition is the partition vector of the matrix columns into blocks
Definition OSMatrix.h:1929
GeneralSparseMatrix * ExpandedMatrixInRowMajorForm
The matrix can be held in expanded form by rows or by columns and in a number of ways stored by block...
Definition OSMatrix.h:1911
bool printExpandedMatrix(bool rowMajor)
a utility routine to print the expanded matrix or block.
ExpandedMatrixBlocks * disassembleMatrix(int *rowPartition, int rowPartitionSize, int *colPartition, int colPartitionSize, bool rowMajor, ENUM_MATRIX_SYMMETRY symmetry)
A method to disassemble a MatrixType into individual blocks of specific structure.
a data structure to represent row reference elements in a MatrixType object Each nonzero element refe...
Definition OSMatrix.h:1265
bool deepCopyFrom(MixedRowReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
ConReferenceMatrixValues * value
The row references (indexes of core rows plus value type) of the elements.
Definition OSMatrix.h:1275
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
virtual ENUM_MATRIX_TYPE getMatrixType()
virtual std::string getMatrixNodeInXML()
virtual MixedRowReferenceMatrixElements * cloneMatrixNode()
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
MixedRowReferenceMatrixElements()
-------— Methods for class MixedRowReferenceMatrixElements -------—
virtual std::string getNodeName()
bool IsEqual(MixedRowReferenceMatrixElements *that)
A function to check for the equality of two objects.
a data structure to represent a matrix object (derived from MatrixType)
Definition OSMatrix.h:2186
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
virtual bool expandElements(bool rowMajor)
A method to process a matrixType into a specific block structure.
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 std::string getNodeName()
std::string name
Definition OSMatrix.h:2189
OSMatrix * createConstructorTreeFromPrefix(std::vector< MatrixNode * > mtxConstructorVec)
virtual OSMatrix * 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.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
bool isBlockDiagonal()
A method to check whether a matrix is block-diagonal.
bool deepCopyFrom(OSMatrix *that)
A function to make a deep copy of an instance of this class.
bool IsEqual(OSMatrix *that)
A function to check for the equality of two objects.
OSMatrix()
-------— Methods for class OSMatrix -------—
virtual std::string getMatrixNodeInXML()
virtual ENUM_MATRIX_TYPE getMatrixType()
this class extends OSMatrix for use, e.g., in the matrixCon section of OSoL and OSrL
Definition OSMatrix.h:2446
OSMatrixWithMatrixConIdx()
-------— Methods for class OSMatrixWithMatrixConIdx -------—
bool deepCopyFrom(OSMatrixWithMatrixConIdx *that)
A function to make a deep copy of an instance of this class.
virtual OSMatrixWithMatrixConIdx * 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 IsEqual(OSMatrixWithMatrixConIdx *that)
A function to check for the equality of two objects.
virtual std::string getMatrixNodeInXML()
this class extends OSMatrix for use, e.g., in the matrixObj section of OSoL and OSrL
Definition OSMatrix.h:2392
bool deepCopyFrom(OSMatrixWithMatrixObjIdx *that)
A function to make a deep copy of an instance of this class.
OSMatrixWithMatrixObjIdx()
-------— Methods for class OSMatrixWithMatrixObjIdx -------—
virtual std::string getMatrixNodeInXML()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
virtual OSMatrixWithMatrixObjIdx * cloneMatrixNode()
The implementation of the virtual functions.
bool IsEqual(OSMatrixWithMatrixObjIdx *that)
A function to check for the equality of two objects.
this class extends OSMatrix for use, e.g., in the matrixVar section of OSoL and OSrL
Definition OSMatrix.h:2337
bool deepCopyFrom(OSMatrixWithMatrixVarIdx *that)
A function to make a deep copy of an instance of this class.
bool IsEqual(OSMatrixWithMatrixVarIdx *that)
A function to check for the equality of two objects.
virtual std::string getMatrixNodeInXML()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
OSMatrixWithMatrixVarIdx()
-------— Methods for class OSMatrixWithMatrixVarIdx -------—
virtual OSMatrixWithMatrixVarIdx * cloneMatrixNode()
The implementation of the virtual functions.
The OSnLMNode Class for nonlinear expressions involving matrices.
Definition OSnLNode.h:1761
The OSnLNode Class for nonlinear expressions.
Definition OSnLNode.h:180
a data structure to represent objective reference elements in a MatrixType object Each nonzero elemen...
Definition OSMatrix.h:1092
virtual ENUM_MATRIX_TYPE getMatrixType()
virtual std::string getMatrixNodeInXML()
virtual std::string getNodeName()
bool deepCopyFrom(ObjReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
virtual ObjReferenceMatrixElements * cloneMatrixNode()
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
ObjReferenceMatrixValues * value
The objective references (indexes of core objectives) of the elements.
Definition OSMatrix.h:1095
ObjReferenceMatrixElements()
-------— Methods for class ObjReferenceMatrixElements -------—
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool IsEqual(ObjReferenceMatrixElements *that)
A function to check for the equality of two objects.
to represent the nonzeros in an objReferenceMatrix element
Definition OSMatrix.h:676
ObjReferenceMatrixValues()
-------— Methods for class ObjReferenceMatrixValues -------—
virtual bool deepCopyFrom(ObjReferenceMatrixValues *that)
A function to make a deep copy of an instance of this class.
bool IsEqual(ObjReferenceMatrixValues *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.
Used to hold part of the instance in memory.
a data structure to represent variable reference elements in a MatrixType object Each nonzero element...
Definition OSMatrix.h:836
bool IsEqual(VarReferenceMatrixElements *that)
A function to check for the equality of two objects.
VarReferenceMatrixElements()
-------— Methods for class VarReferenceMatrixElements -------—
bool deepCopyFrom(VarReferenceMatrixElements *that)
A function to make a deep copy of an instance of this class.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
virtual std::string getNodeName()
virtual VarReferenceMatrixElements * cloneMatrixNode()
virtual bool alignsOnBlockBoundary(int firstRow, int firstColumn, int nRows, int nCols)
Check whether a submatrix aligns with the block partition of a matrix or block or other constructor.
virtual std::string getMatrixNodeInXML()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
VarReferenceMatrixValues * value
The variable references (indexes of core variables) of the elements.
Definition OSMatrix.h:839
virtual ENUM_MATRIX_TYPE getMatrixType()
A concrete class that is used to store a specific type of matrix values, references to variable index...
Definition OSMatrix.h:564
bool IsEqual(VarReferenceMatrixValues *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.
virtual bool deepCopyFrom(VarReferenceMatrixValues *that)
A function to make a deep copy of an instance of this class.
int * el
Each el is a reference to a constraint defined in the <constraints> section of the OSiL file.
Definition OSMatrix.h:569
VarReferenceMatrixValues()
-------— Methods for class VarReferenceMatrixValues -------—
ENUM_NL_EXPR_SHAPE
ENUM_MATRIX_TYPE
An enum to track the many different types of values that a matrix can contain Note that these types a...
ENUM_MATRIX_SYMMETRY
ENUM_MATRIX_CONSTRUCTOR_TYPE
ENUM_CONREFERENCE_VALUETYPE
An enum to track the type of value contained in a reference to a constraint.