Interface InvertibleFactor<N extends Comparable<N>>
- All Superinterfaces:
Structure1D, Structure2D
- All Known Subinterfaces:
Cholesky<N>, Eigenvalue.Spectral<N>, LDL<N>, LDU<N>, LU<N>, MatrixDecomposition.Factor<N>, MatrixDecomposition.Solver<N>, QR<N>, SingularValue<N>
- All Known Implementing Classes:
InvertibleFactor.IdentityFactor, SparseLU, SparseQDLDL
A chainable and reversible in-place (equation system) solver.
Matrix decompositions produce factorisations like [A] = [L][U], [A] = [Q][R] or [A] = [U][D][V]T. When solving equation systems the factors are used in sequence:
[A][x] = [b] and [A] = [L][U] gives [L][U][x] = [b], which is solved in these steps:
- [L][y] = [b] or [y] = [L]-1[b]
- [U][x] = [y] or [x] = [U]-1[y]
If we instead want to solve [x]T[A] = [b]T or [A]T[x] = [b] the steps are:
- [U]T[y] = [b] or [y] = [U]-T[b]
- [L]T[x] = [y] or [x] = [L]-T[y]
Implementing this interface can be useful whenever a matrix (or its inverse) can be constructed using a sequence of factors.
An invertible factor needs to be square.
- Author:
- apete
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classInvertibleFactor.IdentityFactor<N extends Comparable<N>>Nested classes/interfaces inherited from interface Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback, Structure1D.SparseNested 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> -
Method Summary
Modifier and TypeMethodDescriptionvoidbtran(double[] arg) static <N extends Comparable<N>>
voidbtran(List<InvertibleFactor<N>> factors, double[] arg) static <N extends Comparable<N>>
voidbtran(List<InvertibleFactor<N>> factors, PhysicalStore<N> arg) voidbtran(PhysicalStore<N> arg) Backwards-transformationstatic voiddoPrimitive(PhysicalStore<Double> arg, InvertibleFactor<Double> factor) Do primitivebtran(double[])static voiddoPrimitive(InvertibleFactor<Double> factor, PhysicalStore<Double> arg) Do primitiveftran(double[])voidftran(double[] arg) static <N extends Comparable<N>>
voidftran(List<InvertibleFactor<N>> factors, double[] arg) static <N extends Comparable<N>>
voidftran(List<InvertibleFactor<N>> factors, PhysicalStore<N> arg) voidftran(PhysicalStore<N> arg) Forward-transformationstatic <N extends Comparable<N>>
InvertibleFactor<N> identity(int dim) Methods inherited from interface Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, getColDim, getMaxDim, getMinDim, getRowDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
Method Details
-
btran
-
btran
static <N extends Comparable<N>> void btran(List<InvertibleFactor<N>> factors, PhysicalStore<N> arg) -
doPrimitive
Do primitiveftran(double[]) -
doPrimitive
Do primitivebtran(double[]) -
ftran
-
ftran
static <N extends Comparable<N>> void ftran(List<InvertibleFactor<N>> factors, PhysicalStore<N> arg) -
identity
-
btran
void btran(double[] arg) - See Also:
-
btran
Backwards-transformationSolve [x]T[A] = [b]T (equivalent to [A]T[x] = [b]) by transforming [b] into [x] in-place.
- Parameters:
arg- [b] transformed into [x]
-
ftran
void ftran(double[] arg) - See Also:
-
ftran
Forward-transformationSolve [A][x] = [b] by transforming [b] into [x] in-place.
- Parameters:
arg- [b] transformed into [x]
-