Class FletcherMatthews
java.lang.Object
org.ojalgo.matrix.decomposition.FletcherMatthews
Implements 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
FieldsModifier and TypeFieldDescriptionprivate static final boolean(package private) static final NumberContext(package private) static final NumberContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <N extends 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 Details
-
DEBUG
private static final boolean DEBUG- See Also:
-
PRECISION
-
SAFE
-
-
Constructor Details
-
FletcherMatthews
FletcherMatthews()
-
-
Method Details
-
update
static <N extends 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 vectorcolumn- New column valuespreallocated- Preallocated workspace for calculationscol- Index of the column being updated- Returns:
- true if the update was successful, false if the matrix became singular or numerically unstable
-