- java.lang.Object
-
- org.ojalgo.optimisation.linear.ProductFormInverse
-
- All Implemented Interfaces:
InvertibleFactor<java.lang.Double>,BasisRepresentation,Structure1D,Structure2D
final class ProductFormInverse extends java.lang.Object implements BasisRepresentation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classProductFormInverse.ArrayPool(package private) static classProductFormInverse.ElementaryFactor-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.transformation.InvertibleFactor
InvertibleFactor.IdentityFactor<N extends java.lang.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
Fields Modifier and Type Field Description private ObjectPool<SparseArray<java.lang.Double>>myArrayPoolprivate intmyDimprivate java.util.List<ProductFormInverse.ElementaryFactor>myFactorsprivate LU<java.lang.Double>myRootprivate doublemyScalingThresholdprivate R064StoremyWork
-
Constructor Summary
Constructors Constructor Description ProductFormInverse(int dim, double scalingThreshold)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbtran(PhysicalStore<java.lang.Double> arg)Backwards-transformationprivate voidclearFactors()voidftran(PhysicalStore<java.lang.Double> arg)Forward-transformationintgetColDim()intgetRowDim()private ProductFormInverse.ElementaryFactornewFactor(R064Store values, int col, double diagonalElement)voidreset(MatrixStore<java.lang.Double> basis)Update the product form inverse to reflect a replaced column.voidupdate(MatrixStore<java.lang.Double> basis, int col, SparseArray<java.lang.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.structure.Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, getMaxDim, getMinDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
-
-
-
Field Detail
-
myArrayPool
private final ObjectPool<SparseArray<java.lang.Double>> myArrayPool
-
myDim
private final int myDim
-
myFactors
private final java.util.List<ProductFormInverse.ElementaryFactor> myFactors
-
myRoot
private final LU<java.lang.Double> myRoot
-
myScalingThreshold
private final double myScalingThreshold
-
myWork
private final R064Store myWork
-
-
Method Detail
-
btran
public void btran(PhysicalStore<java.lang.Double> arg)
Description copied from interface:InvertibleFactorBackwards-transformationSolve [x]T[A] = [b]T (equivalent to [A]T[x] = [b]) by transforming [b] into [x] in-place.
- Specified by:
btranin interfaceInvertibleFactor<java.lang.Double>- Parameters:
arg- [b] transformed into [x]
-
ftran
public void ftran(PhysicalStore<java.lang.Double> arg)
Description copied from interface:InvertibleFactorForward-transformationSolve [A][x] = [b] by transforming [b] into [x] in-place.
- Specified by:
ftranin interfaceInvertibleFactor<java.lang.Double>- Parameters:
arg- [b] transformed into [x]
-
getColDim
public int getColDim()
- Specified by:
getColDimin interfaceStructure2D- Returns:
- The number of columns
-
getRowDim
public int getRowDim()
- Specified by:
getRowDimin interfaceStructure2D- Returns:
- The number of rows
-
reset
public void reset(MatrixStore<java.lang.Double> basis)
Update the product form inverse to reflect a replaced column.- Specified by:
resetin interfaceBasisRepresentation- Parameters:
basis- Full basis, with the column already exchanged.
-
update
public void update(MatrixStore<java.lang.Double> basis, int col, SparseArray<java.lang.Double> values)
Update the inverse to reflect a replaced column in the basis.- Specified by:
updatein interfaceBasisRepresentation- Parameters:
basis- Full basis, with the column already exchanged.col- The index, of the column, that was exchanged.values- The (non zero) values of that column.
-
clearFactors
private void clearFactors()
-
newFactor
private ProductFormInverse.ElementaryFactor newFactor(R064Store values, int col, double diagonalElement)
-
-