18#include "OSParameters.h"
53 std::ostringstream outStr;
54 outStr <<
"inside MatrixNode destructor" << std::endl;
67 outStr <<
"deleting Matrixnode->m_mChildren[" << i <<
"] at "
112 "First object is NULL, second is not");
123 "Second object is NULL, first is not");
169 ExpandedMatrixInRowMajorForm(NULL),
170 ExpandedMatrixInColumnMajorForm(NULL),
171 m_miRowPartition(NULL),
172 m_iRowPartitionSize(0),
173 m_miColumnPartition(NULL),
174 m_iColumnPartitionSize(0),
175 m_bHaveRowPartition(false),
176 m_bHaveColumnPartition(false)
315 int base_r0, base_c0, base_rN, base_cN;
350 bool isShifted = (iroff > 0 || icoff > 0);
351 bool isCropped = (base_c0 > 0 || base_r0 > 0 ||
354 bool isClipped = (iroff + base_rN - base_r0 >=
numberOfRows ||
356 bool isScaled = (scaleMult != 1);
361 if ( !isShifted && !isCropped && !isClipped && !isScaled && !reTyped )
380 for (
int i=0; i < baseMtx->
startSize; i++)
393 if ( !isShifted && !isCropped && !isClipped )
412 for (
int i=0; i < baseMtx->
startSize; i++)
426 for (
int i = 0; i < baseMtx->
valueSize; i++)
435 for (
int i = 0; i < baseMtx->
valueSize; i++)
451 for (
int i = 0; i < baseMtx->
valueSize; i++)
454 if (!(tmpValues->
el[i]
456 throw ErrorClass(
"failed copying linear element values in method getMatrixCoefficientsInColumnMajor()");
467 for (
int i = 0; i < baseMtx->
valueSize; i++)
481 throw ErrorClass(
"scalar multiple not defined for objReference elements in getMatrixCoefficientsInColumnMajor()");
485 throw ErrorClass(
"scalar multiple not defined for conReference elements in getMatrixCoefficientsInColumnMajor()");
499 int* tmpStarts =
new int[startSize];
500 for (
int i=0; i < startSize; i++)
503 int adjc = icoff - base_c0;
504 int lastcol = icoff + base_cN - base_c0 + 1;
509 for (
int i=icoff; i<lastcol; i++)
510 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
512 if (baseMtx->
index[j] >= base_r0 &&
513 baseMtx->
index[j] <= base_rN &&
517 for (
int i=icoff+1; i < startSize; i++)
518 tmpStarts[i] += tmpStarts[i-1];
520 int valueSize = tmpStarts[startSize-1];
521 int* tmpIndexes =
new int[valueSize];
533 for (
int i=icoff; i<lastcol; i++)
534 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
536 if (baseMtx->
index[j] >= base_r0 &&
537 baseMtx->
index[j] <= base_rN &&
540 tmpIndexes[ival] = baseMtx->
index[j] - base_r0 + iroff;
558 for (
int i=icoff; i<lastcol; i++)
559 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
561 if (baseMtx->
index[j] >= base_r0 &&
564 tmpIndexes[ival] = baseMtx->
index[j] - base_r0 + iroff;
581 for (
int i=icoff; i<lastcol; i++)
582 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
584 if (baseMtx->
index[j] >= base_r0 &&
611 for (
int i=icoff; i<lastcol; i++)
612 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
614 if (baseMtx->
index[j] >= base_r0 &&
618 if (!(tmpValues->
el[ival]
620 throw ErrorClass(
"failed copying linear element values in method getMatrixCoefficientsInColumnMajor()");
637 for (
int i=icoff; i<lastcol; i++)
638 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
640 if (baseMtx->
index[j] >= base_r0 &&
649 ->copyNodeAndDescendants();
662 for (
int i=icoff; i<lastcol; i++)
663 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
665 if (baseMtx->
index[j] >= base_r0 &&
687 throw ErrorClass(
"scalar multiple not defined for objReference elements in getMatrixCoefficientsInColumnMajor()");
691 throw ErrorClass(
"scalar multiple not defined for conReference elements in getMatrixCoefficientsInColumnMajor()");
702 throw ErrorClass(
"error processing blocks in getMatrixCoefficientsInColumnMajor()");
726 for (
int j = c0; j < cN; j++)
754 for (
int j = c0; j < cN; j++)
757 for (
int k = currentBlocks->
blocks[i]->
start[j-c0];
760 tmpIndexes[loc] = currentBlocks->
blocks[i]->
index[k] + row_adj;
772 throw ErrorClass(
"getMatrixCoefficientsInColumnMajor: Can only handle constant values so far in blocks");
784 throw ErrorClass(
"transformations not yet implemented in getMatrixCoefficientsInColumnMajor()");
824 throw ErrorClass(
"Unknown element type in getMatrixCoefficientsInColumnMajor()");
878 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
897 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
919 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
945 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
964 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
986 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
1017 throw ErrorClass(
"Multiple constructors not yet implemented in getMatrixCoefficientsInColumnMajor()");
1067 int base_r0, base_c0, base_rN, base_cN;
1102 bool isShifted = (iroff > 0 || icoff > 0);
1103 bool isCropped = (base_c0 > 0 || base_r0 > 0 ||
1106 bool isClipped = (iroff + base_rN - base_r0 >=
numberOfRows ||
1108 bool isScaled = (scaleMult != 1);
1113 if ( !isShifted && !isCropped && !isClipped && !isScaled && !reTyped )
1132 for (
int i=0; i < baseMtx->
startSize; i++)
1144 if ( !isShifted && !isCropped && !isClipped )
1163 for (
int i=0; i < baseMtx->
startSize; i++)
1177 for (
int i = 0; i < baseMtx->
valueSize; i++)
1186 for (
int i = 0; i < baseMtx->
valueSize; i++)
1202 for (
int i = 0; i < baseMtx->
valueSize; i++)
1205 if (!(tmpValues->
el[i]
1207 throw ErrorClass(
"failed copying linear element values in method getMatrixCoefficientsInRowMajor()");
1218 for (
int i = 0; i < baseMtx->
valueSize; i++)
1232 throw ErrorClass(
"scalar multiple not defined for objReference elements in getMatrixCoefficientsInRowMajor()");
1236 throw ErrorClass(
"scalar multiple not defined for conReference elements in getMatrixCoefficientsInRowMajor()");
1250 int* tmpStarts =
new int[startSize];
1251 for (
int i=0; i < startSize; i++)
1254 int adjc = icoff - base_c0;
1255 int lastcol = icoff + base_cN - base_c0 + 1;
1260 for (
int i=icoff; i<lastcol; i++)
1261 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
1263 if (baseMtx->
index[j] >= base_r0 &&
1264 baseMtx->
index[j] <= base_rN &&
1268 for (
int i=icoff+1; i <= startSize; i++)
1269 tmpStarts[i] += tmpStarts[i-1];
1271 int valueSize = tmpStarts[startSize-1];
1272 int* tmpIndexes =
new int[valueSize];
1284 for (
int i=icoff; i<lastcol; i++)
1285 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
1287 if (baseMtx->
index[j] >= base_r0 &&
1288 baseMtx->
index[j] <= base_rN &&
1291 tmpIndexes[ival] = baseMtx->
index[j] - base_r0 + iroff;
1309 for (
int i=icoff; i<lastcol; i++)
1310 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
1312 if (baseMtx->
index[j] >= base_r0 &&
1315 tmpIndexes[ival] = baseMtx->
index[j] + base_r0 - iroff;
1332 for (
int i=icoff; i<lastcol; i++)
1333 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
1335 if (baseMtx->
index[j] >= base_r0 &&
1362 for (
int i=icoff; i<lastcol; i++)
1363 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
1365 if (baseMtx->
index[j] >= base_r0 &&
1369 if (!(tmpValues->
el[ival]
1371 throw ErrorClass(
"failed copying linear element values in method getMatrixCoefficientsInRowMajor()");
1388 for (
int i=icoff; i<lastcol; i++)
1389 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
1391 if (baseMtx->
index[j] >= base_r0 &&
1400 ->copyNodeAndDescendants();
1413 for (
int i=icoff; i<lastcol; i++)
1414 for (
int j=baseMtx->
start[i-adjc]; j<baseMtx->
start[i-adjc+1]; j++)
1416 if (baseMtx->
index[j] >= base_r0 &&
1438 throw ErrorClass(
"scalar multiple not defined for objReference elements in getMatrixCoefficientsInRowMajor()");
1442 throw ErrorClass(
"scalar multiple not defined for conReference elements in getMatrixCoefficientsInRowMajor()");
1453 throw ErrorClass(
"error processing blocks in getMatrixCoefficientsInRowMajor()");
1473 for (
int i=0; i < currentBlocks->
blockNumber; i++)
1477 for (
int j = c0; j < cN; j++)
1499 for (
int i=0; i < currentBlocks->
blockNumber; i++)
1505 for (
int j = c0; j < cN; j++)
1508 for (
int k = currentBlocks->
blocks[i]->
start[j-c0];
1511 tmpIndexes[loc] = currentBlocks->
blocks[i]->
index[k] + row_adj;
1523 throw ErrorClass(
"getMatrixCoefficientsInRowMajor: Can only handle constant values so far in blocks");
1535 throw ErrorClass(
"transformations not yet implemented in getMatrixCoefficientsInColumnMajor()");
1575 throw ErrorClass(
"Unknown element type in getMatrixCoefficientsInRowMajor()");
1607 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[i + 1]; j++)
1630 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
1649 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
1671 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
1697 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
1716 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
1738 for (j = refMtx->
start->
el[i]; j < refMtx->
start->
el[ i + 1 ]; j++)
1769 throw ErrorClass(
"Multiple constructors not yet implemented in getMatrixCoefficientsInRowMajor()");
1803 std::ostringstream outStr;
1809 outStr <<
"matrix " << ((
OSMatrix*)
this)->idx;
1811 outStr <<
" (" << ((
OSMatrix*)
this)->name <<
")";
1812 outStr << std::endl;
1815 outStr <<
"matrix block" << std::endl;
1817 throw ErrorClass(
"matrix type unknown or not set");
1819 outStr <<
"number of rows " <<
numberOfRows << std::endl;
1821 outStr <<
"number of nonzeros " << tmp->
valueSize << std::endl;
1825 outStr << std::endl <<
"These matrix arrays are organized ";
1827 outStr <<
"by rows" << std::endl;
1829 outStr <<
"by columns" << std::endl;
1831 outStr << std::endl <<
"starts:";
1833 outStr <<
" " << tmp->
start[i];
1834 outStr << std::endl;
1836 outStr << std::endl <<
"indexes:";
1838 outStr <<
" " << tmp->
index[i];
1839 outStr << std::endl;
1841 outStr << std::endl <<
"values:";
1846 outStr << std::endl;
1852 outStr << std::endl;
1858 outStr << std::endl;
1864 outStr << std::endl;
1868 outStr << std::endl;
1870 outStr <<
"element " << i <<
": (general expression; not yet implemented)" << std::endl;
1871 outStr << std::endl;
1875 outStr << std::endl;
1878 outStr <<
"element " << i <<
": ";
1890 for (
int j=0; j<m; j++)
1895 if (temp->
coef != 1)
1896 outStr << temp->
coef <<
"*";
1897 outStr <<
"x[" << temp->
idx <<
"]";
1899 outStr << std::endl;
1901 outStr << std::endl;
1931 if (refMtx == NULL )
return NULL;
1932 if (refMtx->
start == NULL || refMtx->
startSize <= 1 )
return NULL;
1941 int* miStart = matrix->
start;
1942 int* miIndex = matrix->
index;
1944 for ( i = 1; i < iStartSize; i++)
1950 for (i = 0; i < iNumSource; i++)
1952 for (j = refMtx->
start[i]; j < refMtx->
start[ i + 1 ]; j++)
1957 miStart[refMtx->
index[j] + 1] ++;
1964 for (i = 1; i < iStartSize; i++ )
1966 miStart[i] += miStart [i - 1] ;
1978 for (i = 0; i < iNumSource; i++)
1981 for (j = refMtx->
start[i]; j < refMtx->
start[ i + 1 ]; j++)
1983 iTemp = miStart[refMtx->
index[j]];
1984 miIndex [ iTemp] = i;
1987 miStart[refMtx->
index[j]] ++;
1996 for (i = 0; i < iNumSource; i++)
1999 for (j = refMtx->
start[i]; j < refMtx->
start[ i + 1 ]; j++)
2001 iTemp = miStart[refMtx->
index[j]];
2002 miIndex [ iTemp] = i;
2005 miStart[refMtx->
index[j]] ++;
2016 for (i = 0; i < iNumSource; i++)
2019 for (j = refMtx->
start[i]; j < refMtx->
start[ i + 1 ]; j++)
2021 iTemp = miStart[refMtx->
index[j]];
2022 miIndex [ iTemp] = i;
2025 miStart[refMtx->
index[j]] ++;
2037 for (i = 0; i < iNumSource; i++)
2040 for (j = refMtx->
start[i]; j < refMtx->
start[ i + 1 ]; j++)
2042 iTemp = miStart[refMtx->
index[j]];
2043 miIndex [ iTemp] = i;
2046 miStart[refMtx->
index[j]] ++;
2055 for (i = 0; i < iNumSource; i++)
2058 for (j = refMtx->
start[i]; j < refMtx->
start[ i + 1 ]; j++)
2060 iTemp = miStart[refMtx->
index[j]];
2061 miIndex [ iTemp] = i;
2064 miStart[refMtx->
index[j]] ++;
2076 for (i = 0; i < iNumSource; i++)
2079 for (j = refMtx->
start[i]; j < refMtx->
start[ i + 1 ]; j++)
2081 iTemp = miStart[refMtx->
index[j]];
2082 miIndex [ iTemp] = i;
2085 miStart[refMtx->
index[j]] ++;
2091 for (i = iStartSize - 1; i >= 1; i-- )
2093 miStart[i] = miStart [i - 1] ;
2105 if (!OK)
throw ErrorClass(
"Error processing blocks");
2115 if (!OK)
throw ErrorClass(
"Error processing blocks");
2125 if (!OK)
throw ErrorClass(
"Error processing blocks");
2135 if (!OK)
throw ErrorClass(
"Error processing blocks");
2148 int nPartitions = 0;
2156 if (nPartitions == 0)
2229 if (nPartitions > 1)
2231 int* tempPartition =
new int[imerge_R];
2232 for (
int i=0; i < imerge_R; i++)
2237 tempPartition =
new int[imerge_C];
2238 for (
int i=0; i < imerge_C; i++)
2269 int* colPartition,
int colPartitionSize,
2270 bool rowMajor,
bool appendToBlockArray)
2284 for (
int i=0; i < rowPartitionSize; i++)
2287 for (
int i=0; i < colPartitionSize; i++)
2295 if (!appendToBlockArray)
return NULL;
2298 colPartition, colPartitionSize,
false,
symmetry))
2331 for (
int j=0; j < rowOffsetSize; j++)
2335 for (
int j=0; j < colOffsetSize; j++)
2343 tmpBlocks->
vType = elType;
2352 int tmpBlockNumber = 0;
2374 tmpBlocks->
blockRows =
new int[tmpBlockNumber];
2415 tmpBlocks->
vType = elType;
2422 tmpBlocks->
blocks = NULL;
2435 colOffsetSize, rowMajor,
symmetry));
2443 int refinement = -1;
2444 int coarsening = -1;
2445 bool refinementCandidate;
2446 bool coarseningCandidate;
2451 refinementCandidate =
true;
2469 refinementCandidate =
false;
2477 if (refinementCandidate)
2496 refinementCandidate =
false;
2505 if (refinementCandidate)
2511 coarseningCandidate =
false;
2530 coarseningCandidate =
true;
2556 coarseningCandidate =
true;
2564 if (coarseningCandidate)
2570 if (refinement >= 0)
2572 throw ErrorClass (
"Not yet implemented: obtaining one block partition from a different one");
2576 if (coarsening >= 0)
2578 throw ErrorClass (
"Not yet implemented: obtaining one block partition from a different one");
2583 throw ErrorClass (
"Not yet implemented: obtaining one block partition from a different one");
2595 int* colPartition,
int colPartitionSize,
2612 int currBlockRow, currBlockCol, lastBlock, currRow;
2613 int blockCount, firstBlockInCol, blockTotal;
2614 std::vector<GeneralSparseMatrix*> tmpBlocks;
2616 int* tmpBlockColumns;
2625 firstBlockInCol = -1;
2631 elCount =
new int[rowPartitionSize-1];
2633 for (i=0; i < colPartitionSize-1; i++)
2636 for (j=0; j<rowPartitionSize-1; j++)
2639 if (lastBlock >= rowPartitionSize)
2640 lastBlock = rowPartitionSize - 1;
2642 for (j=colPartition[i]; j<colPartition[i+1]; j++)
2649 if (currRow < rowPartition[lastBlock] || currRow >= rowPartition[lastBlock+1])
2652 int n = lastBlock + 1;
2653 while (!found && n < rowPartitionSize - 1)
2656 if (currRow >= rowPartition[n+1])
2667 while (!found && n >= 0)
2670 if (currRow < rowPartition[n])
2680 throw ErrorClass(
"Invalid row information detected in disassembleMatrix()");
2682 elCount[lastBlock]++;
2683 if (elCount[lastBlock] == 1)
2688 if (firstBlockInCol < 0)
2689 firstBlockInCol = blockCount - 1;
2695 tmpBlock->
vType = vType;
2696 tmpBlock->
startSize = colPartition[i+1] - colPartition[i] + 1;
2699 for (
int n=0; n <= j - colPartition[i]; n++)
2700 tmpBlock->
start[n] = 0;
2702 tmpBlocks.push_back(tmpBlock);
2703 if (firstBlockInCol < 0)
2704 firstBlockInCol = blockCount - 1;
2710 for (k=firstBlockInCol; k < blockCount; k++)
2711 tmpBlocks[k]->start[j-colPartition[i] + 1] = elCount[k];
2716 for (k=firstBlockInCol; k < blockCount; k++)
2718 tmpBlocks[k]->valueSize = elCount[k];
2719 tmpBlocks[k]->index =
new int[elCount[k]];
2722 tmpBlockRows =
new int[blockCount];
2723 tmpBlockColumns =
new int[blockCount];
2724 for (j=0; j<blockCount; j++)
2726 tmpBlockRows[j] = -1;
2732 for (j=colPartition[i]; j<colPartition[i+1]; j++)
2739 if (currRow < rowPartition[lastBlock] || currRow >= rowPartition[lastBlock+1])
2745 for (n=lastBlock+1; n < rowPartitionSize - 1; n++)
2746 if (currRow >= rowPartition[lastBlock] &&
2747 currRow < rowPartition[lastBlock+1])
2756 for (n=lastBlock-1; k >= 0; k--)
2757 if (currRow >= rowPartition[lastBlock] &&
2758 currRow < rowPartition[lastBlock+1])
2766 if (tmpBlockRows[lastBlock] == -1)
2768 tmpBlockRows[lastBlock] = j;
2769 tmpBlockColumns[lastBlock] = i;
2774 tmpBlocks[lastBlock]->index[k-k0]
2782 throw ErrorClass(
"Row major not yet implemented in MatrixType::disassembleMatrix()");
2786 returnArray->
vType = vType;
2795 for (
size_t i=0; i<tmpBlocks.size();i++);
2797 returnArray->
blocks[i] = tmpBlocks[i];
2798 returnArray->
blockRows[i] = tmpBlockRows[i];
2812 bool mustCopy =
false;
2820 for (
int i=0; i < n; i++)
2850 ostringstream outStr;
2859 outStr <<
"deleting MatrixElements->start at " << &
start << std::endl;
2871 outStr <<
"deleting MatrixElements->index at " << &
index << std::endl;
2909 "First object is NULL, second is not");
2920 "Second object is NULL, first is not");
2988 std::vector<MatrixNode*> stackVec;
2989 int kount = mtxConstructorVec.size() - 1;
2995 for(
int i = 0; i < numkids; i++)
2997 mtxConstructorVec[kount]->m_mChildren[i] = stackVec.back();
2998 stackVec.pop_back();
3001 stackVec.push_back( mtxConstructorVec[kount]);
3005 return (
OSMatrix*)mtxConstructorVec[ 0];
3077 bool haveRowForm = (baseMtx->ExpandedMatrixInRowMajorForm != NULL);
3078 bool haveColumnForm = (baseMtx->ExpandedMatrixInColumnMajorForm != NULL);
3081 if (targetMatrixFirstRow == 0 && targetMatrixFirstCol == 0 &&
3082 baseMatrixStartRow == 0 && baseMatrixStartCol == 0 &&
3085 scalarMultiplier == 1)
3130 for (
int j=0; j < currentBlocks->numberOfBlocks; j++)
3178 bool mustSynchronize;
3196 m_bBlockPartitionProcessed =
true;
3203 mustSynchronize =
false;
3212 mustSynchronize =
true;
3232 if (haveBlocks ==
false)
3236 mustSynchronize =
true;
3262 temp =
new int[tempSize];
3263 for (
int l=0; l < nsync; l++)
3289 for (
int l=0; l<nsync; l++)
3293 if (nsync == 2)
break;
3297 if (haveBlocks ==
false)
3308 mustSynchronize =
false;
3317 mustSynchronize =
true;
3333 if (haveBlocks ==
false)
3337 mustSynchronize =
true;
3363 temp =
new int[tempSize];
3364 for (
int l=0; l < nsync; l++)
3390 for (
int l=0; l<nsync; l++)
3394 if (nsync == 2)
break;
3398 if (haveBlocks ==
false)
3412 bool accumulator =
true;
3428 int haveBaseBlocks =
false;
3442 haveBaseBlocks =
true;
3444 if (!isDiagonal)
return false;
3470 if (iconst == 1 && !haveBaseBlocks)
return false;
3478 for (
int j=1; j < colPartitionSize; j++)
3479 for (
int k = colPartition[j-1]; k < colPartition[j]; j++)
3484 < rowPartition[j-1] ||
3486 >= rowPartition[j] )
3491 for (
int j=1; j < rowPartitionSize; j++)
3492 for (
int k = rowPartition[j-1]; k < rowPartition[j]; j++)
3497 < colPartition[j-1] ||
3499 >= colPartition[j] )
3509 for (
int j=1; j < colPartitionSize; j++)
3510 for (
int k = colPartition[j-1]; k < colPartition[j]; j++)
3515 < rowPartition[j-1] ||
3517 >= rowPartition[j] )
3522 for (
int j=1; j < rowPartitionSize; j++)
3523 for (
int k = rowPartition[j-1]; k < rowPartition[j]; j++)
3528 < colPartition[j-1] ||
3530 >= colPartition[j] )
3540 for (
int j=1; j < colPartitionSize; j++)
3541 for (
int k = colPartition[j-1]; k < colPartition[j]; j++)
3546 < rowPartition[j-1] ||
3548 >= rowPartition[j] )
3553 for (
int j=1; j < rowPartitionSize; j++)
3554 for (
int k = rowPartition[j-1]; k < rowPartition[j]; j++)
3559 < colPartition[j-1] ||
3561 >= colPartition[j] )
3571 for (
int j=1; j < colPartitionSize; j++)
3572 for (
int k = colPartition[j-1]; k < colPartition[j]; j++)
3577 < rowPartition[j-1] ||
3579 >= rowPartition[j] )
3584 for (
int j=1; j < rowPartitionSize; j++)
3585 for (
int k = rowPartition[j-1]; k < rowPartition[j]; j++)
3590 < colPartition[j-1] ||
3592 >= colPartition[j] )
3602 for (
int j=1; j < colPartitionSize; j++)
3603 for (
int k = colPartition[j-1]; k < colPartition[j]; j++)
3608 < rowPartition[j-1] ||
3610 >= rowPartition[j] )
3615 for (
int j=1; j < rowPartitionSize; j++)
3616 for (
int k = rowPartition[j-1]; k < rowPartition[j]; j++)
3621 < colPartition[j-1] ||
3623 >= colPartition[j] )
3633 for (
int j=1; j < colPartitionSize; j++)
3634 for (
int k = colPartition[j-1]; k < colPartition[j]; j++)
3639 < rowPartition[j-1] ||
3641 >= rowPartition[j] )
3646 for (
int j=1; j < rowPartitionSize; j++)
3647 for (
int k = rowPartition[j-1]; k < rowPartition[j]; j++)
3652 < colPartition[j-1] ||
3654 >= colPartition[j] )
3669 unsigned int inumberOfChildren,
MatrixNode **m_mChildren)
3684 ostringstream outStr;
3685 outStr <<
"<matrix";
3691 outStr <<
" name=\"" <<
name <<
"\"";
3697 outStr <<
">" << std::endl;
3700 outStr <<
"</matrix>" << std::endl;
3703 outStr <<
"/>" << std::endl;
3704 return outStr.str();
3727 "First object is NULL, second is not");
3738 "Second object is NULL, first is not");
3744 if (this->
idx != that->
idx)
return false;
3745 if (this->
name != that->
name)
return false;
3773 ostringstream outStr;
3774 outStr <<
"<matrixVar";
3781 outStr <<
" name=\"" <<
name <<
"\"";
3787 outStr <<
">" << std::endl;
3790 outStr <<
"</matrixVar>" << std::endl;
3793 outStr <<
"/>" << std::endl;
3794 return outStr.str();
3824 ostringstream outStr;
3825 outStr <<
"<matrixObj";
3832 outStr <<
" name=\"" <<
name <<
"\"";
3838 outStr <<
">" << std::endl;
3841 outStr <<
"</matrixObj>" << std::endl;
3844 outStr <<
"/>" << std::endl;
3845 return outStr.str();
3874 ostringstream outStr;
3875 outStr <<
"<matrixCon";
3882 outStr <<
" name=\"" <<
name <<
"\"";
3888 outStr <<
">" << std::endl;
3891 outStr <<
"</matrixCon>" << std::endl;
3894 outStr <<
"/>" << std::endl;
3895 return outStr.str();
3909 targetMatrixFirstRow(0),
3910 targetMatrixFirstCol(0),
3911 baseMatrixStartRow(0),
3912 baseMatrixStartCol(0),
3913 baseMatrixEndRow(-1),
3914 baseMatrixEndCol(-1),
3915 baseTranspose(false),
3916 scalarMultiplier(1.0)
3938 return "baseMatrix";
3948 ostringstream outStr;
3949 outStr <<
"<baseMatrix";
3960 outStr <<
" baseTranspose=\"true\"";
3967 outStr <<
"/>" << std::endl;
3968 return outStr.str();
3973 return ((
OSMatrix*)
baseMatrix)->alignsOnBlockBoundary(firstRow, firstColumn, nRows, nCols);
3996 "First object is NULL, second is not");
4007 "Second object is NULL, first is not");
4033 transformation(NULL)
4058 return "transformation";
4070 ostringstream outStr;
4071 outStr <<
"<transformation";
4074 outStr <<
">" << std::endl;
4078 outStr <<
"</transformation>" << std::endl;
4079 return outStr.str();
4107 "First object is NULL, second is not");
4118 "Second object is NULL, first is not");
4147 "Inside the ConstantMatrixElements Destructor");
4149 ostringstream outStr;
4152 outStr <<
"deleting ConstantMatrixElements->value at " << &
value << std::endl;
4168 return "constantElements";
4180 ostringstream outStr;
4181 outStr <<
"<constantElements";
4183 outStr <<
" rowMajor=\"true\"";
4185 outStr <<
">" << std::endl;
4187 outStr <<
"<start>" << std::endl;
4189 outStr <<
"</start>" << std::endl;
4193 outStr <<
"<index>" << std::endl;
4195 outStr <<
"</index>" << std::endl;
4197 outStr <<
"<value>" << std::endl;
4205 outStr <<
"<el mult=\"" <<
mult <<
"\">";
4207 outStr <<
"</el>" << std::endl;
4210 outStr <<
"</value>" << std::endl;
4213 outStr <<
"</constantElements>" << std::endl;
4214 return outStr.str();
4242 "First object is NULL, second is not");
4253 "Second object is NULL, first is not");
4259 if (this->rowMajor != that->
rowMajor)
return false;
4295 ostringstream outStr;
4298 outStr <<
"deleting ConstantMatrixValues->el at " << &
el << std::endl;
4320 "First object is NULL, second is not");
4331 "Second object is NULL, first is not");
4339 if (this->
el[i] != that->
el[i])
return false;
4359 this->
el[i] = that->
el[i];
4378 "Inside the VarReferenceMatrixElements Destructor");
4380 ostringstream outStr;
4383 outStr <<
"deleting VarReferenceMatrixElements->value at " << &
value << std::endl;
4399 return "varReferenceElements";
4412 ostringstream outStr;
4413 outStr <<
"<varReferenceElements";
4415 outStr <<
" rowMajor=\"true\"";
4417 outStr <<
">" << std::endl;
4419 outStr <<
"<start>" << std::endl;
4421 outStr <<
"</start>" << std::endl;
4425 outStr <<
"<index>" << std::endl;
4427 outStr <<
"</index>" << std::endl;
4429 outStr <<
"<value>" << std::endl;
4437 outStr <<
"<el mult=\"" <<
mult <<
"\">";
4439 outStr <<
"<el mult=\"" <<
mult <<
"\" incr=\"" << incr <<
"\">";
4441 outStr <<
"</el>" << std::endl;
4444 outStr <<
"</value>" << std::endl;
4447 outStr <<
"</varReferenceElements>" << std::endl;
4448 return outStr.str();
4476 "First object is NULL, second is not");
4487 "Second object is NULL, first is not");
4493 if (this->rowMajor != that->
rowMajor)
return false;
4529 "Inside the VarReferenceMatrixValues Destructor");
4530 ostringstream outStr;
4533 outStr <<
"deleting VarReferenceMatrixValues->el at " << &
el << std::endl;
4555 "First object is NULL, second is not");
4566 "Second object is NULL, first is not");
4574 if (this->
el[i] != that->
el[i])
return false;
4594 this->
el[i] = that->
el[i];
4611 std::ostringstream outStr;
4614 "Inside the LinearMatrixElements Destructor");
4618 outStr <<
"deleting LinearMatrixElements->value at " << &
value << std::endl;
4634 return "linearElements";
4646 ostringstream outStr;
4647 outStr <<
"<linearElements";
4649 outStr <<
" rowMajor=\"true\"";
4651 outStr <<
">" << std::endl;
4653 outStr <<
"<start>" << std::endl;
4655 outStr <<
"</start>" << std::endl;
4659 outStr <<
"<index>" << std::endl;
4661 outStr <<
"</index>" << std::endl;
4663 outStr <<
"<value>" << std::endl;
4672 outStr <<
">" << std::endl;
4676 outStr <<
"<varIdx";
4681 outStr <<
"</varIdx>" << std::endl;
4684 outStr <<
"</el>" << std::endl;
4686 outStr <<
"</value>" << std::endl;
4688 outStr <<
"</linearElements>" << std::endl;
4689 return outStr.str();
4717 "First object is NULL, second is not");
4728 "Second object is NULL, first is not");
4734 if (this->rowMajor != that->
rowMajor)
return false;
4763 "Inside the LinearMatrixValues Constructor");
4770 std::ostringstream outStr;
4773 "Inside the LinearMatrixValues Destructor");
4777 outStr <<
"deleting LinearMatrixValues->el at " << &
el << std::endl;
4791 outStr <<
"deleting LinearMatrixValues->el [" << i <<
"] at " << &
el[i] << std::endl;
4817 "First object is NULL, second is not");
4828 "Second object is NULL, first is not");
4837 if (!this->
el[i]->
IsEqual(that->
el[i]))
return false;
4879 std::ostringstream outStr;
4895 outStr <<
"DESTROYING VARIDX " << i <<
" at " << &
varIdx[i] << std::endl;
4920 "First object is NULL, second is not");
4931 "Second object is NULL, first is not");
5004 "First object is NULL, second is not");
5015 "Second object is NULL, first is not");
5021 if (this->
idx != that->
idx)
return false;
5022 if (this->
coef != that->
coef)
return false;
5057 ostringstream outStr;
5060 outStr <<
"deleting GeneralMatrixElements->value at " << &
value << std::endl;
5076 return "generalElements";
5088 ostringstream outStr;
5089 outStr <<
"<generalElements";
5091 outStr <<
" rowMajor=\"true\"";
5093 outStr <<
">" << std::endl;
5095 outStr <<
"<start>" << std::endl;
5097 outStr <<
"</start>" << std::endl;
5101 outStr <<
"<index>" << std::endl;
5103 outStr <<
"</index>" << std::endl;
5105 outStr <<
"<value>" << std::endl;
5111 outStr <<
"</el>" << std::endl;
5113 outStr <<
"</value>" << std::endl;
5115 outStr <<
"</generalElements>" << std::endl;
5116 return outStr.str();
5144 "First object is NULL, second is not");
5155 "Second object is NULL, first is not");
5161 if (this->rowMajor != that->
rowMajor)
return false;
5195 std::ostringstream outStr;
5202 outStr <<
"NUMBER OF VALUES = " <<
numberOfEl << endl;
5214 outStr <<
"deleting ConstantMatrixValues->el [" << i <<
"] at " << &
el[i] << std::endl;
5242 "First object is NULL, second is not");
5253 "Second object is NULL, first is not");
5262 if (!this->
el[i]->
IsEqual(that->
el[i]))
return false;
5300 ostringstream outStr;
5303 outStr <<
"deleting ObjReferenceMatrixElements->value at " << &
value << std::endl;
5319 return "objRefElements";
5331 ostringstream outStr;
5332 outStr <<
"<objReferenceElements";
5334 outStr <<
" rowMajor=\"true\"";
5336 outStr <<
">" << std::endl;
5338 outStr <<
"<start>" << std::endl;
5340 outStr <<
"</start>" << std::endl;
5345 outStr <<
"<index>" << std::endl;
5347 outStr <<
"</index>" << std::endl;
5349 outStr <<
"<value>" << std::endl;
5357 outStr <<
"<el mult=\"" <<
mult <<
"\">";
5359 outStr <<
"<el mult=\"" <<
mult <<
"\" incr=\"" << incr <<
"\">";
5361 outStr <<
"</el>" << std::endl;
5364 outStr <<
"</value>" << std::endl;
5367 outStr <<
"</objReferenceElements>" << std::endl;
5368 return outStr.str();
5396 "First object is NULL, second is not");
5407 "Second object is NULL, first is not");
5413 if (this->rowMajor != that->
rowMajor)
return false;
5451 ostringstream outStr;
5454 outStr <<
"deleting ObjReferenceMatrixValues->el at " << &
el << std::endl;
5476 "First object is NULL, second is not");
5487 "Second object is NULL, first is not");
5495 if (this->
el[i] != that->
el[i])
return false;
5515 this->
el[i] = that->
el[i];
5535 ostringstream outStr;
5538 outStr <<
"deleting ConReferenceMatrixElements->value at " << &
value << std::endl;
5554 return "conRefElements";
5566 ostringstream outStr;
5567 outStr <<
"<conReferenceElements";
5569 outStr <<
" rowMajor=\"true\"";
5571 outStr <<
">" << std::endl;
5573 outStr <<
"<start>" << std::endl;
5575 outStr <<
"</start>" << std::endl;
5579 outStr <<
"<index>" << std::endl;
5581 outStr <<
"</index>" << std::endl;
5583 outStr <<
"<value>" << std::endl;
5590 outStr <<
" valueType=\"";
5595 outStr <<
"</el>" << std::endl;
5597 outStr <<
"</value>" << std::endl;
5600 outStr <<
"</conReferenceElements>" << std::endl;
5601 return outStr.str();
5629 "First object is NULL, second is not");
5640 "Second object is NULL, first is not");
5646 if (this->rowMajor != that->
rowMajor)
return false;
5691 ostringstream outStr;
5694 outStr <<
"deleting ConstantMatrixValues->el [" << i <<
"] at " << &
el[i] << std::endl;
5721 "First object is NULL, second is not");
5732 "Second object is NULL, first is not");
5740 if (!this->
el[i]->
IsEqual(that->
el[i]))
return false;
5795 "First object is NULL, second is not");
5806 "Second object is NULL, first is not");
5860 return "mixedRowRefElements";
5875 ostringstream outStr;
5888 outStr <<
"<objReferenceElements";
5890 outStr <<
" rowMajor=\"true\"";
5891 outStr <<
" numberOfValues=\"" << tmpNum <<
"\"";
5892 outStr <<
">" << std::endl;
5896 outStr <<
"<start>" << std::endl;
5897 outStr <<
"<el>0</el>" << std::endl;
5905 outStr <<
"<el>" << tmpNum <<
"</el>" << std::endl;
5907 outStr <<
"</start>" << std::endl;
5909 outStr <<
"<index>" << std::endl;
5915 outStr <<
"<el>" <<
index->
el[j] <<
"</el>";
5918 outStr <<
"</index>" << std::endl;
5920 outStr <<
"<value>" << std::endl;
5929 outStr <<
"</value>" << std::endl;
5930 outStr <<
"</objReferenceElements>" << std::endl;
5932 outStr <<
"<conReferenceElements";
5934 outStr <<
" rowMajor=\"true\"";
5935 outStr <<
" numberOfValues=\"" <<
numberOfValues - tmpNum <<
"\"";
5936 outStr <<
">" << std::endl;
5938 outStr <<
"<start>" << std::endl;
5939 outStr <<
"<el>0</el>" << std::endl;
5947 outStr <<
"<el>" << tmpNum <<
"</el>" << std::endl;
5949 outStr <<
"</start>" << std::endl;
5951 outStr <<
"<index>" << std::endl;
5957 outStr <<
"<el>" <<
index->
el[j] <<
"</el>";
5960 outStr <<
"</index>" << std::endl;
5962 outStr <<
"<value>" << std::endl;
5972 outStr <<
" valueType=\"";
5979 outStr <<
"</value>" << std::endl;
5980 outStr <<
"</conReferenceElements>" << std::endl;
5985 outStr <<
"<start>" << std::endl;
5987 outStr <<
"</start>" << std::endl;
5991 outStr <<
"<index>" << std::endl;
5993 outStr <<
"</index>" << std::endl;
5995 outStr <<
"<value>" << std::endl;
6003 outStr <<
"</el>" << std::endl;
6005 outStr <<
"</value>" << std::endl;
6007 outStr <<
"</objReferenceElements>" << std::endl;
6012 outStr <<
"<conReferenceElements";
6014 outStr <<
" rowMajor=\"true\"";
6016 outStr <<
">" << std::endl;
6018 outStr <<
"<start>" << std::endl;
6020 outStr <<
"</start>" << std::endl;
6024 outStr <<
"<index>" << std::endl;
6026 outStr <<
"</index>" << std::endl;
6028 outStr <<
"<value>" << std::endl;
6035 outStr <<
" valueType=\"";
6041 outStr <<
"</el>" << std::endl;
6043 outStr <<
"</value>" << std::endl;
6045 outStr <<
"</conReferenceElements>" << std::endl;
6048 return outStr.str();
6076 "First object is NULL, second is not");
6087 "Second object is NULL, first is not");
6093 if (this->rowMajor != that->
rowMajor)
return false;
6129 std::ostringstream outStr;
6140 outStr <<
"deleting MatrixBlocks->colOffset at " << &
colOffset << std::endl;
6146 outStr <<
"deleting MatrixBlocks->rowOffset at " << &
rowOffset << std::endl;
6161 for (
int i=0; i < numberOfBlocks; i++)
6163 if (block[i] != NULL)
6168 outStr <<
"deleting MatrixBlocks->block [" << i <<
"] at " << &block[i] << std::endl;
6206 ostringstream outStr;
6207 outStr <<
"<blocks numberOfBlocks=\"" <<
inumberOfChildren <<
"\">" << std::endl;
6210 outStr <<
"</colOffset>" << std::endl;
6213 outStr <<
"</rowOffset>" << std::endl;
6218 outStr <<
"</blocks>" << std::endl;
6219 return outStr.str();
6224 bool accumulator =
false;
6227 for (
int i=0; i < nrBlocks; i++)
6233 if (!accumulator)
return false;
6234 for (
int i=0; i < ncBlocks; i++)
6263 "First object is NULL, second is not");
6274 "Second object is NULL, first is not");
6334 ostringstream outStr;
6336 outStr <<
" blockRowIdx=\"" <<
blockRowIdx <<
"\"";
6337 outStr <<
" blockColIdx=\"" <<
blockColIdx <<
"\"";
6345 outStr <<
">" << std::endl;
6348 outStr <<
"</block>" << std::endl;
6351 outStr <<
"/>" << std::endl;
6352 return outStr.str();
6391 b_deleteStartArray(true),
6392 b_deleteIndexArray(true),
6393 b_deleteValueArray(true),
6409 b_deleteStartArray(true),
6410 b_deleteIndexArray(true),
6411 b_deleteValueArray(true),
6428 ostringstream outStr;
6440 outStr <<
"deleting GeneralSparseMatrix->start at " << &
start << std::endl;
6455 outStr <<
"deleting GeneralSparseMatrix->index at " << &
index << std::endl;
6470 outStr <<
"deleting GeneralSparseMatrix->value at " << &
value << std::endl;
6484 "Inside GeneralSparseMatrix::isDiagonal()");
6496 if (
index[j] != i-1)
6511 bDeleteArrays(true),
6524 bDeleteArrays(true),
6538 std::ostringstream outStr;
6549 outStr <<
"deleting ExpandedMatrixBlocks->blockRows at " << &
blockRows << std::endl;
6561 outStr <<
"deleting ExpandedMatrixBlocks->blockColumns at " << &
blockColumns << std::endl;
6577 outStr <<
"deleting ExpandedMatrixBlocks->blocks[" << i <<
"] at "
6578 << &
blocks[i] << std::endl;
6596 "Inside ExpandedMatrixBlocks::getBlock()");
6609 "Inside ExpandedMatrixBlocks::isBlockDiagonal()");
6671 std::vector<ExprNode*> nlNodeVec;
6675 tmpNum->
value = val;
6676 nlNodeVec.push_back(tmpNum);
6693 std::vector<ExprNode*> nlNodeVec;
6704 throw ErrorClass(
"OSnLNodeObjective not yet implemented");
6705 nlNodeVec.push_back(tmpRef);
6722 std::vector<ExprNode*> nlNodeVec;
6735 nlNodeVec.push_back(tmpVar);
6740 nlNodeVec.push_back(tmpNum);
6743 nlNodeVec.push_back(tmpTimes);
6751 nlNodeVec.push_back(tmpNum);
6754 nlNodeVec.push_back(tmpSum);
6771 throw ErrorClass(
"In convertToGeneralMatrixElement: OSnLNodeConstraint not yet implemented");
6784 throw ErrorClass(
"In convertToConReferenceMatrixElement: OSnLNodeConstraint not yet implemented");
6797 std::vector<ExprNode*> nlNodeVec;
6801 for(i = 0; i < numQPTerms; i++)
6803 instanceData->nonlinearExpressions->nl[ i] =
new Nl();
6804 instanceData->nonlinearExpressions->nl[ i]->idx = rowIndexes[ i];
6808 nlNodeVariablePoint->
idx = varOneIndexes[ i];
6810 nlNodeVariablePoint->
coef = coefficients[ i];
6811 nlNodeVec.push_back( nlNodeVariablePoint);
6814 nlNodeVariablePoint->
idx = varTwoIndexes[ i];
6815 nlNodeVec.push_back( nlNodeVariablePoint);
6818 nlNodeVec.push_back( (
OSnLNode*)nlNodePoint);
6821 instanceData->nonlinearExpressions->nl[ i]->osExpressionTree->m_treeRoot =
6822 ((
OSnLNode*)nlNodeVec[ 0])->createExpressionTreeFromPostfix( nlNodeVec);
const OSSmartPtr< OSOutput > osoutput
std::string os_dtoa_format(double x)
void getMultIncr(int *i, int *mult, int *incr, int size, int defaultIncr)
getMultIncr
int getMult(int *i, int size)
getMult
ConReferenceMatrixElement * convertToConReferenceMatrixElement(int objref)
LinearMatrixElement * convertToLinearMatrixElement(double val)
Some methods to convert one type of matrix element into another.
ScalarExpressionTree * convertToGeneralMatrixElement(double val)
static Bigint * mult(Bigint *a, Bigint *b)
std::string writeIntVectorData(IntVector *v, bool addWhiteSpace, bool writeBase64)
Take an IntVector object and write a string that validates against the OSgL schema.
a data structure to represent a point of departure for constructing a matrix by modifying parts of a ...
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...
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
double scalarMultiplier
to allow the base matrix to be scaled before it is attached to the target matrix
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
OSMatrix * baseMatrix
a pointer to the base matrix
virtual std::string getNodeName()
bool baseTranspose
to allow the base matrix to be transposed before it is attached to the target matrix
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...
a data structure to represent an entry in a conReferenceMatrix element, which consists of a constrain...
ENUM_CONREFERENCE_VALUETYPE valueType
Several different types of values can be derived from a problem constraint.
double value
This element contains the value.
~ConReferenceMatrixElement()
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)
a data structure to represent row reference elements in a MatrixType object Each nonzero element is o...
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.
~ConReferenceMatrixElements()
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.
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
~ConReferenceMatrixValues()
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.
a data structure to represent the constant elements in a MatrixType object
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.
~ConstantMatrixElements()
virtual std::string getNodeName()
virtual std::string getMatrixNodeInXML()
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
ConstantMatrixValues * value
The value array of the (nonzero) constant elements.
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
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.
used for throwing exceptions.
std::string errormsg
errormsg is the error that is causing the exception to be thrown
a sparse matrix data structure for matrices that can hold nonconstant values and have block structure...
int blockNumber
blockNumber gives the number of blocks (which is the size of the blockRows and blockColumns arrays).
GeneralSparseMatrix ** blocks
blocks holds the blocks that make up the matrix.
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...
int * blockRows
blockRows holds an integer array of the row to which a block belongs.
int rowOffsetSize
These two parameters give the size of the rowOffset and colOffset arrays, respectively.
int * colOffset
colOffset gives the column offsets of the block decomposition It does not have to correspond to the c...
bool isRowMajor
isRowMajor holds whether the (nonzero) values holding the data are stored by columnrow.
~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 ...
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.
bool bDeleteArrays
bDeleteArrays is true if we delete the arrays in garbage collection set to true by default
ExpandedMatrixBlocks()
Default constructor.
OSnLNode ** m_mChildren
m_mChildren holds all the operands, that is, nodes that the current node operates on.
virtual std::string getNonlinearExpressionInXML()
The following method writes an OSnLNode or OSnLMNode in OSiL format.
a data structure to represent the nonzero values in a generalMatrix element
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.
a data structure to represent the nonzeros in a generalMatrix element
virtual bool deepCopyFrom(GeneralMatrixValues *that)
A function to make a deep copy of an instance of this class.
GeneralMatrixValues()
-------— Methods for class GeneralMatrixValues -------—
ScalarExpressionTree ** el
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
bool isRowMajor
isRowMajor holds whether the matrix is stored by row.
GeneralSparseMatrix()
Default constructor.
bool b_deleteStartArray
b_deleteStartArray is true if we delete the start array in garbage collection — set to true by defaul...
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,...
int * index
index holds an integer array of rowIdx (or colIdx) elements in coefMatrix (AMatrix).
bool b_deleteIndexArray
b_deleteIndexArray is true if we delete the index array in garbage collection — set to true by defaul...
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...
int * start
start holds an integer array of start elements in the matrix, which points to the start of a column (...
ENUM_MATRIX_SYMMETRY symmetry
To track the type of symmetry present in the matrix or block.
int valueSize
valueSize is the dimension of the index and value arrays
~GeneralSparseMatrix()
Default destructor.
ENUM_MATRIX_TYPE vType
vType holds the type of values found in the value array.
int startSize
startSize is the dimension of the starts array
bool IsEqual(IntVector *that)
A method to compare two invectors.
a data structure to represent an expression in a linearMatrix element A LinearMatrixElement is a (fin...
bool IsEqual(LinearMatrixElement *that)
A function to check for the equality of two objects.
LinearMatrixElementTerm ** varIdx
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}...
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.
~LinearMatrixElementTerm()
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
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...
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
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
a data structure to represent a MatrixBlock object (derived from MatrixType)
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()
virtual std::string getNodeName()
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...
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...
virtual ENUM_MATRIX_TYPE getMatrixType()
virtual std::string getMatrixNodeInXML()
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 -------—
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.
virtual ~MatrixConstructor()
destructor
MatrixConstructor()
constructor
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
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".
an abstract class to help represent the elements in a MatrixType object From this we derive concrete ...
MatrixElements()
-------— Methods for class MatrixElements -------—
IntVector * start
A vector listing the row or column starts.
IntVector * index
The index array of the (nonzero) elements.
virtual ~MatrixElements()
bool rowMajor
To indicate whether the matrix elements are stored in row major form or column major form.
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
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,...
virtual bool IsEqual(MatrixNode *that)
A function to check for the equality of two objects.
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...
unsigned int inumberOfChildren
inumberOfChildren is the number of MatrixNode child elements For the matrix types (OSMatrix and Matri...
MatrixNode()
default constructor
virtual std::string getMatrixNodeInXML()=0
MatrixNode ** m_mChildren
m_mChildren holds all the children, that is, nodes used in the definition or construction of the curr...
virtual ~MatrixNode()
destructor
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.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
ENUM_MATRIX_CONSTRUCTOR_TYPE nType
nType is a unique integer assigned to each type of matrix node (see OSParameters.h)
virtual std::string getNodeName()=0
a data structure to represent a MatrixType object (from which we derive OSMatrix and MatrixBlock)
int * m_miRowPartition
m_miRowPartition is the partition vector of the matrix rows into blocks
GeneralSparseMatrix * convertToOtherMajor(bool isColumnMajor)
A method to convert a matrix to the other major.
int getNumberOfElementConstructors()
int m_iRowPartitionSize
m_iRowPartitionSize gives the size of the m_miRowPartition array, which is one more than the number o...
GeneralSparseMatrix * ExpandedMatrixInColumnMajorForm
MatrixType()
-------— Methods for class MatrixType -------—
bool m_bHaveRowPartition
m_bHaveRowPartition tracks whether the row partition has been determined from the constructor list an...
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.
int m_iColumnPartitionSize
m_iColumnPartitionSize gives the size of the m_miColumnPartition array, which is one more than the nu...
bool matrixHasTransformations()
GeneralSparseMatrix * getMatrixCoefficientsInColumnMajor()
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()
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.
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.
std::vector< ExpandedMatrixBlocks * > ExpandedMatrixByBlocks
GeneralSparseMatrix * getMatrixBlockInColumnMajorForm(int columnIdx, int rowIdx)
ENUM_MATRIX_TYPE type
To track the type of values present in the matrix or block.
GeneralSparseMatrix * getMatrixCoefficientsInRowMajor()
bool m_bHaveColumnPartition
m_bHaveColumnPartition tracks whether the column partition has been determined from the constructor l...
bool processBlockPartition()
A method to determine the block structure of a matrixType as defined by the <blocks> element or eleme...
int getNumberOfBlocksConstructors()
int * m_miColumnPartition
m_miColumnPartition is the partition vector of the matrix columns into blocks
GeneralSparseMatrix * ExpandedMatrixInRowMajorForm
The matrix can be held in expanded form by rows or by columns and in a number of ways stored by block...
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...
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.
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()
MixedRowReferenceMatrixElements()
-------— Methods for class MixedRowReferenceMatrixElements -------—
virtual std::string getNodeName()
bool IsEqual(MixedRowReferenceMatrixElements *that)
A function to check for the equality of two objects.
The in-memory representation of the <nl> element.
a data structure to represent a matrix object (derived from MatrixType)
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()
OSMatrix * createConstructorTreeFromPrefix(std::vector< MatrixNode * > mtxConstructorVec)
virtual OSMatrix * cloneMatrixNode()
The implementation of the virtual functions.
virtual ENUM_MATRIX_CONSTRUCTOR_TYPE getNodeType()
bool isBlockDiagonal()
A method to check whether a matrix is block-diagonal.
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
OSMatrixWithMatrixConIdx()
-------— Methods for class OSMatrixWithMatrixConIdx -------—
virtual OSMatrixWithMatrixConIdx * cloneMatrixNode()
The implementation of the virtual functions.
~OSMatrixWithMatrixConIdx()
virtual std::string getMatrixNodeInXML()
this class extends OSMatrix for use, e.g., in the matrixObj section of OSoL and OSrL
OSMatrixWithMatrixObjIdx()
-------— Methods for class OSMatrixWithMatrixObjIdx -------—
virtual std::string getMatrixNodeInXML()
~OSMatrixWithMatrixObjIdx()
virtual OSMatrixWithMatrixObjIdx * cloneMatrixNode()
The implementation of the virtual functions.
this class extends OSMatrix for use, e.g., in the matrixVar section of OSoL and OSrL
~OSMatrixWithMatrixVarIdx()
virtual std::string getMatrixNodeInXML()
OSMatrixWithMatrixVarIdx()
-------— Methods for class OSMatrixWithMatrixVarIdx -------—
virtual OSMatrixWithMatrixVarIdx * cloneMatrixNode()
The implementation of the virtual functions.
bool IsEqual(OSnLMNode *that)
A function to check for the equality of two objects.
The OSnLNode Class for nonlinear expressions.
OSnLNode * createExpressionTreeFromPostfix(std::vector< ExprNode * > nlNodeVec)
Take a vector of ExprNodes (OSnLNodes and OSnLMNodes) in postfix format and create a scalar-valued OS...
virtual OSnLNode * copyNodeAndDescendants()
make a copy of this node and all its descendants
The OSnLNodeNumber Class.
double value
value is the value of the number
The OSnLNodeVariable Class.
int idx
idx is the index of the variable
double coef
coef is an option coefficient on the variable, the default value is 1.0
a data structure to represent objective reference elements in a MatrixType object Each nonzero elemen...
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()
~ObjReferenceMatrixElements()
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.
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
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.
~ObjReferenceMatrixValues()
Used to hold part of the instance in memory.
OSnLNode * m_treeRoot
m_treeRoot holds the root node (of OSnLNode type) of the expression tree.
a data structure to represent variable reference elements in a MatrixType object Each nonzero element...
bool IsEqual(VarReferenceMatrixElements *that)
A function to check for the equality of two objects.
~VarReferenceMatrixElements()
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.
virtual ENUM_MATRIX_TYPE getMatrixType()
A concrete class that is used to store a specific type of matrix values, references to variable index...
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.
~VarReferenceMatrixValues()
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.
VarReferenceMatrixValues()
-------— Methods for class VarReferenceMatrixValues -------—
@ ENUM_NL_EXPR_SHAPE_general
std::string returnConReferenceValueTypeString(ENUM_CONREFERENCE_VALUETYPE valueType)
std::string returnExprShapeString(ENUM_NL_EXPR_SHAPE shape)
std::string returnMatrixSymmetryString(ENUM_MATRIX_SYMMETRY symmetry)
std::string returnMatrixTypeString(ENUM_MATRIX_TYPE type)
@ ENUM_OUTPUT_LEVEL_detailed_trace
@ ENUM_OUTPUT_LEVEL_debug
@ ENUM_OUTPUT_LEVEL_trace
@ ENUM_OUTPUT_LEVEL_warning
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_TYPE_linear
@ ENUM_MATRIX_TYPE_varReference
@ ENUM_MATRIX_TYPE_constant
@ ENUM_MATRIX_TYPE_conReference
@ ENUM_MATRIX_TYPE_general
@ ENUM_MATRIX_TYPE_unknown
@ ENUM_MATRIX_TYPE_mixedRowReference
@ ENUM_MATRIX_TYPE_objReference
@ ENUM_MATRIX_SYMMETRY_none
ENUM_MATRIX_TYPE mergeMatrixType(ENUM_MATRIX_TYPE type1, ENUM_MATRIX_TYPE type2)
A function to merge two matrix types so we can infer the type of a matrix recursively.
ENUM_MATRIX_CONSTRUCTOR_TYPE
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_mixedRowRefElements
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_generalElements
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_varRefElements
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_transformation
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_objRefElements
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_conRefElements
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_unknown
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_blocks
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_linearElements
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_block
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_matrix
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_constantElements
@ ENUM_MATRIX_CONSTRUCTOR_TYPE_baseMatrix
@ ENUM_OUTPUT_AREA_OSMatrix
@ ENUM_OUTPUT_AREA_OSGeneral
@ ENUM_OUTPUT_AREA_OSInstance
@ ENUM_CONREFERENCE_VALUETYPE_value