Package org.ojalgo.optimisation.linear
Class ProductFormInverse
java.lang.Object
org.ojalgo.optimisation.linear.ProductFormInverse
- All Implemented Interfaces:
InvertibleFactor<Double>
,Structure1D
,Structure2D
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
(package private) static final class
Nested classes/interfaces inherited from interface org.ojalgo.matrix.transformation.InvertibleFactor
InvertibleFactor.IdentityFactor<N extends Comparable<N>>
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,
B extends Structure2D.Logical<S, B>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.Reshapable, Structure2D.RowColumnKey<R, C>, Structure2D.RowColumnMapper<R, C> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ObjectPool
<SparseArray<Double>> private final int
private final List
<ProductFormInverse.ElementaryFactor> private final double
private final R064Store
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
btran
(PhysicalStore<Double> arg) Backwards-transformationprivate void
void
ftran
(PhysicalStore<Double> arg) Forward-transformationint
int
(package private) void
reset()
(package private) void
reset
(MatrixStore<Double> basis) Update the product form inverse to reflect a replaced column.(package private) void
update
(int col, SparseArray<Double> values) Update the product form inverse to reflect a replaced column.(package private) void
update
(MatrixStore<Double> basis, int index, SparseArray<Double> values) Update the inverse to reflect a replaced column in the basis.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ojalgo.matrix.transformation.InvertibleFactor
btran, ftran
Methods inherited from interface org.ojalgo.structure.Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, getMaxDim, getMinDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
Field Details
-
myArrayPool
-
myDim
private final int myDim -
myFactors
-
myRoot
-
myScalingThreshold
private final double myScalingThreshold -
myWork
-
-
Constructor Details
-
ProductFormInverse
ProductFormInverse(int dim, double scalingThreshold)
-
-
Method Details
-
btran
Description copied from interface:InvertibleFactor
Backwards-transformationSolve [x]T[A] = [b]T (equivalent to [A]T[x] = [b]) by transforming [b] into [x] in-place.
- Specified by:
btran
in interfaceInvertibleFactor<Double>
- Parameters:
arg
- [b] transformed into [x]
-
ftran
Description copied from interface:InvertibleFactor
Forward-transformationSolve [A][x] = [b] by transforming [b] into [x] in-place.
- Specified by:
ftran
in interfaceInvertibleFactor<Double>
- Parameters:
arg
- [b] transformed into [x]
-
getColDim
public int getColDim()- Specified by:
getColDim
in interfaceStructure2D
- Returns:
- The number of columns
-
getRowDim
public int getRowDim()- Specified by:
getRowDim
in interfaceStructure2D
- Returns:
- The number of rows
-
clearFactors
private void clearFactors() -
newFactor
private ProductFormInverse.ElementaryFactor newFactor(R064Store values, int col, double diagonalElement) -
reset
void reset() -
reset
Update the product form inverse to reflect a replaced column.- Parameters:
basis
- Full basis, with the column already exchanged.
-
update
Update the product form inverse to reflect a replaced column.- Parameters:
col
- The column, of the basis, that was exchanged.values
- The (non zero) values of that column.
-
update
Update the inverse to reflect a replaced column in the basis.- Parameters:
basis
- Full basis, with the column already exchanged.index
- The index, of the column, that was exchanged.values
- The (non zero) values of that column.
-