- java.lang.Object
-
- org.ojalgo.matrix.decomposition.FletcherMatthews
-
abstract class FletcherMatthews extends java.lang.ObjectImplements the Fletcher-Matthews form preserving method for LU factorization updates.This algorithm is a variation of the Bartels-Golub-Reid method that preserves the form of the matrices during column updates. Key characteristics:
- Preserves the triangular structure of L and U matrices
- Handles column updates efficiently by tracking the last non-zero row
- Performs row and column exchanges to maintain numerical stability
- Updates both L and U matrices to reflect the changes
- Maintains the relationship L*U = P*A*Q where P and Q are permutation matrices
The algorithm works by:
- Applying forward substitution to transform the new column
- Finding the last non-zero row in the transformed column
- Performing column exchanges to position the column correctly
- Applying row exchanges and updates to maintain triangular form
- Updating both L and U matrices to reflect all changes
This method is particularly effective for maintaining the structure of sparse matrices during updates, as it minimizes fill-in and preserves sparsity patterns.
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanDEBUG(package private) static NumberContextPRECISION(package private) static NumberContextSAFE
-
Constructor Summary
Constructors Constructor Description FletcherMatthews()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static <N extends java.lang.Comparable<N>>
booleanupdate(Pivot rowOrder, PhysicalStore<N> combined, Pivot colOrder, int columnIndex, Access1D.Collectable<N,? super TransformableRegion<N>> column, PhysicalStore<N> preallocated)Updates the LU decomposition when a column is modified in the original matrix.
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
-
PRECISION
static final NumberContext PRECISION
-
SAFE
static final NumberContext SAFE
-
-
Method Detail
-
update
static <N extends java.lang.Comparable<N>> boolean update(Pivot rowOrder, PhysicalStore<N> combined, Pivot colOrder, int columnIndex, Access1D.Collectable<N,? super TransformableRegion<N>> column, PhysicalStore<N> preallocated)
Updates the LU decomposition when a column is modified in the original matrix. This version is used when L and U are stored in a combined format.- Parameters:
rowOrder- Current row permutation vectorcombined- Matrix storing both L and U factors in a combined formatcolOrder- Current column permutation vectorcol- Index of the column being updatedcolumn- New column valuespreallocated- Preallocated workspace for calculations- Returns:
- true if the update was successful, false if the matrix became singular or numerically unstable
-
-