Class DenseTableau
java.lang.Object
org.ojalgo.optimisation.linear.SimplexStore
org.ojalgo.optimisation.linear.SimplexTableau
org.ojalgo.optimisation.linear.DenseTableau
- All Implemented Interfaces:
Access1D<Double>, Access2D<Double>, Mutate1D, Mutate2D, Structure1D, Structure2D
-
Nested Class Summary
Nested classes/interfaces inherited from class SimplexStore
SimplexStore.ColumnStateNested classes/interfaces inherited from interface Access2D
Access2D.Aggregatable<N>, Access2D.Collectable<N,R>, Access2D.ColumnView<N>, Access2D.ElementView<N>, Access2D.RowView<N>, Access2D.SelectionView<N>, Access2D.Sliceable<N>, Access2D.Visitable<N> Nested classes/interfaces inherited from interface Mutate1D
Mutate1D.SortableNested classes/interfaces inherited from interface Mutate2D
Mutate2D.Exchangeable, Mutate2D.Fillable<N>, Mutate2D.Mixable<N>, Mutate2D.Modifiable<N>, Mutate2D.ModifiableReceiver<N>, Mutate2D.Receiver<N>Nested classes/interfaces inherited from interface Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S,B>, Structure1D.LongIndex, Structure1D.LoopCallback Nested classes/interfaces inherited from interface Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S,B>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R>, Structure2D.Reshapable, Structure2D.RowColumnKey<R, C>, Structure2D.RowColumnMapper<R, C> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate double[]private final double[][]Fields inherited from class SimplexTableau
PRECISIONFields inherited from class SimplexStore
edgeWeights, excluded, included, m, n, structure -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidcopyBasicSolution(double[] solution) protected voiddoPivot(int row, int col) Perform the pivot operation on the tableau – only.private voiddoPivot(int row, int col, double[] pivotRow) doubledoubleValue(int row, int col) Extracts one element of this matrix as a double.(package private) double(package private) booleanfixVariable(int index, double value) int(package private) double(package private) doublegetReducedCost(int je) int(package private) doublegetValue()(package private) Primitive2D(package private) Primitive1D(package private) Primitive1D(package private) Primitive1Dphase1()The phase-1 objective function.(package private) voidprivate voidscale(double[] body, int col) voidset(int row, int col, double value) protected voidshiftColumn(int col, double shift) Methods inherited from class SimplexTableau
calculateDualDirection, calculateIteration, calculatePrimalDirection, constraintsBody, constraintsRHS, findNextPivotColumn, generateCutCandidates, get, getCost, getCurrentElement, getCurrentElement, getCurrentRHS, getInfeasibility, newSimplexTableauSolver, newTableauFactory, objective, pivot, pivot, prepareToIterate, resetBasis, set, setupClassicPhase1Objective, sliceBodyColumn, sliceBodyRow, sliceConstraintsRHS, sliceDualVariables, sliceTableauColumn, sliceTableauRow, toString, updateDualEdgeWeights, updatePrimalEdgeWeights, valueMethods inherited from class SimplexStore
countRemainingArtificials, extractSolution, generateCutCandidates, getColumnState, getLowerBound, getLowerBounds, getLowerGap, getRange, getUpperBound, getUpperBounds, getUpperGap, isArtificial, isExcluded, isIncluded, isNegated, isPrintable, isRemainingArtificials, lower, newDualSimplexSolver, newPhasedSimplexSolver, newPrimalSimplexSolver, newStoreFactory, resetEdgeWeights, unbounded, update, updateBasis, updateRange, upperMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Access1D
asCollectable1D, asKeyed1D, asList, axpy, dot, select, supplyTo, toList, toRawCopy1DMethods inherited from interface Access2D
asCollectable2D, asKeyed2D, byteValue, byteValue, byteValue, byteValue, columns, columns, columns, doubleValue, doubleValue, doubleValue, elements, floatValue, floatValue, floatValue, floatValue, get, intValue, intValue, intValue, intValue, longValue, longValue, longValue, longValue, nonzeros, rows, rows, rows, select, select, shortValue, shortValue, shortValue, shortValue, toRawCopy2DMethods inherited from interface Mutate2D
set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setMethods inherited from interface Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, getMaxDim, getMinDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
Field Details
-
myColDim
private final int myColDim -
myPhase1Row
private double[] myPhase1Row -
myTableau
private final double[][] myTableau
-
-
Constructor Details
-
DenseTableau
DenseTableau(int mm, int nn) -
DenseTableau
DenseTableau(LinearStructure linearStructure)
-
-
Method Details
-
doubleValue
public double doubleValue(int row, int col) Description copied from interface:Access2DExtracts one element of this matrix as a double.- Parameters:
row- A row index.col- A column index.- Returns:
- One matrix element
-
getColDim
public int getColDim()- Returns:
- The number of columns
-
getRowDim
public int getRowDim()- Returns:
- The number of rows
-
set
public void set(int row, int col, double value) -
doPivot
private void doPivot(int row, int col, double[] pivotRow) -
scale
private void scale(double[] body, int col) -
doPivot
protected void doPivot(int row, int col) Description copied from class:SimplexTableauPerform the pivot operation on the tableau – only. Various auxiliary bookkeeping should NOT be done here.- Specified by:
doPivotin classSimplexTableau
-
shiftColumn
protected void shiftColumn(int col, double shift) - Overrides:
shiftColumnin classSimplexStore
-
copyBasicSolution
void copyBasicSolution(double[] solution) - Specified by:
copyBasicSolutionin classSimplexStore
-
extractValue
double extractValue()- Specified by:
extractValuein classSimplexStore
-
fixVariable
boolean fixVariable(int index, double value) - Specified by:
fixVariablein classSimplexTableau
-
getInfeasibility
double getInfeasibility()- Specified by:
getInfeasibilityin classSimplexTableau- Returns:
- The phase 1 objective function value
-
getReducedCost
double getReducedCost(int je) - Specified by:
getReducedCostin classSimplexStore
-
getValue
double getValue()- Specified by:
getValuein classSimplexTableau- Returns:
- The (phase 2) objective function value
-
newConstraintsBody
Primitive2D newConstraintsBody()- Specified by:
newConstraintsBodyin classSimplexTableau
-
newConstraintsRHS
Primitive1D newConstraintsRHS()- Specified by:
newConstraintsRHSin classSimplexTableau
-
newObjective
Primitive1D newObjective()- Specified by:
newObjectivein classSimplexTableau
-
phase1
Primitive1D phase1()Description copied from class:SimplexStoreThe phase-1 objective function.- Specified by:
phase1in classSimplexStore
-
removePhase1
void removePhase1()- Specified by:
removePhase1in classSimplexStore
-