Lines Matching refs:col

64 const Simplex::Unknown &SimplexBase::unknownFromColumn(unsigned col) const {  in unknownFromColumn()
65 assert(col < getNumColumns() && "Invalid column"); in unknownFromColumn()
66 return unknownFromIndex(colUnknown[col]); in unknownFromColumn()
79 Simplex::Unknown &SimplexBase::unknownFromColumn(unsigned col) { in unknownFromColumn() argument
80 assert(col < getNumColumns() && "Invalid column"); in unknownFromColumn()
81 return unknownFromIndex(colUnknown[col]); in unknownFromColumn()
156 for (unsigned col = 1, e = getNumColumns(); col < e; ++col) in addRow() local
157 tableau(newRow, col) = in addRow()
158 nRowCoeff * tableau(newRow, col) + idxRowCoeff * tableau(pos, col); in addRow()
268 for (unsigned col = 3 + nSymbol, e = getNumColumns(); col < e; ++col) in addCut() local
269 tableau(cutRow, col) = mod(tableau(row, col), d); // b_i%d. in addCut()
332 for (unsigned col = 3; col < 3 + nSymbol; ++col) in getSymbolicSampleNumerator() local
333 sample.push_back(tableau(row, col)); in getSymbolicSampleNumerator()
410 for (unsigned col = 3; col < 3 + nSymbol; ++col) in addSymbolicCut() local
411 divCoeffs.push_back(mod(-tableau(row, col), divDenom)); // (-a_i%d)s_i in addSymbolicCut()
427 for (unsigned col = 3; col < 3 + nSymbol - 1; ++col) in addSymbolicCut() local
428 tableau(cutRow, col) = -mod(-tableau(row, col), d); // -(-a_i%d)s_i. in addSymbolicCut()
431 for (unsigned col = 3 + nSymbol, e = getNumColumns(); col < e; ++col) in addSymbolicCut() local
432 tableau(cutRow, col) = mod(tableau(row, col), d); // (b_i%d)y_i. in addSymbolicCut()
748 for (unsigned col = 3 + nSymbol, e = getNumColumns(); col < e; ++col) { in moveRowUnknownToColumn() local
749 if (tableau(row, col) <= 0) in moveRowUnknownToColumn()
752 !maybeColumn ? col : getLexMinPivotColumn(row, *maybeColumn, col); in moveRowUnknownToColumn()
808 auto getSampleChangeCoeffForVar = [this, row](unsigned col, in getLexMinPivotColumn()
810 int64_t a = tableau(row, col); in getLexMinPivotColumn()
813 if (u.pos == col) in getLexMinPivotColumn()
825 int64_t c = tableau(u.pos, col); in getLexMinPivotColumn()
857 Optional<unsigned> col; in findPivot() local
866 if (!col || colUnknown[j] < colUnknown[*col]) in findPivot()
867 col = j; in findPivot()
870 if (!col) in findPivot()
874 tableau(row, *col) < 0 ? flippedDirection(direction) : direction; in findPivot()
875 Optional<unsigned> maybePivotRow = findPivotRow(row, newDirection, *col); in findPivot()
876 return Pivot{maybePivotRow.value_or(row), *col}; in findPivot()
883 void SimplexBase::swapRowWithCol(unsigned row, unsigned col) { in swapRowWithCol() argument
884 std::swap(rowUnknown[row], colUnknown[col]); in swapRowWithCol()
885 Unknown &uCol = unknownFromColumn(col); in swapRowWithCol()
889 uCol.pos = col; in swapRowWithCol()
933 for (unsigned col = 1, e = getNumColumns(); col < e; ++col) { in pivot() local
934 if (col == pivotCol) in pivot()
936 tableau(pivotRow, col) = -tableau(pivotRow, col); in pivot()
947 for (unsigned col = 1, numCols = getNumColumns(); col < numCols; ++col) { in pivot() local
948 if (col == pivotCol) in pivot()
951 tableau(row, col) = tableau(row, col) * tableau(pivotRow, 0) + in pivot()
952 tableau(row, pivotCol) * tableau(pivotRow, col); in pivot()
1002 unsigned col) const { in findPivotRow()
1012 int64_t elem = tableau(row, col); in findPivotRow()
1142 Optional<unsigned> SimplexBase::findAnyPivotRow(unsigned col) { in findAnyPivotRow() argument
1144 if (tableau(row, col) != 0) in findAnyPivotRow()
1236 for (unsigned col = getNumFixedCols(), e = getNumColumns(); col < e; in undo() local
1237 col++) { in undo()
1238 assert(colUnknown[col] != nullIndex && in undo()
1240 if (std::find(basis.begin(), basis.end(), colUnknown[col]) != in undo()
1243 if (tableau(u.pos, col) == 0) in undo()
1245 pivot(u.pos, col); in undo()
1501 for (unsigned col = 0, e = a.getNumColumns(); col < e; ++col) in makeProduct() local
1502 result.tableau(resultRow, col) = a.tableau(row, col); in makeProduct()
1516 for (unsigned col = 2, e = b.getNumColumns(); col < e; ++col) in makeProduct() local
1517 result.tableau(resultRow, offset + col) = b.tableau(row, col); in makeProduct()
2102 for (unsigned col = 2, e = getNumColumns(); col < e; ++col) in print() local
2103 os << ", c" << col << ": " << colUnknown[col]; in print()
2106 for (unsigned col = 0, numCols = getNumColumns(); col < numCols; ++col) in print() local
2107 os << tableau(row, col) << '\t'; in print()