public class TriangularSolver_FDRM
extends java.lang.Object
This contains algorithms for solving systems of equations where T is a
non-singular triangular matrix:
T*x = b
where x and b are vectors, and T is an n by n matrix. T can either be a lower or upper triangular matrix.
These functions are designed for use inside of other algorithms. To use them directly is dangerous since no sanity checks are performed.
| Constructor and Description |
|---|
TriangularSolver_FDRM() |
| Modifier and Type | Method and Description |
|---|---|
static void |
invertLower(float[] L,
float[] L_inv,
int m) |
static void |
invertLower(float[] L,
int m)
Inverts a square lower triangular matrix: L = L-1
|
static void |
solveL(float[] L,
float[] b,
int n)
Solves for non-singular lower triangular matrices using forward substitution.
|
static void |
solveL(float[] L,
float[] b,
int m,
int n)
L is a m by m matrix
B is a m by n matrix
|
static void |
solveTranL(float[] L,
float[] b,
int n)
This is a forward substitution solver for non-singular lower triangular matrices.
|
static void |
solveU(float[] U,
float[] b,
int n)
This is a forward substitution solver for non-singular upper triangular matrices.
|
static void |
solveU(float[] U,
float[] b,
int sideLength,
int minRow,
int maxRow) |
static void |
solveU(float[] U,
int startU,
int strideU,
int widthU,
float[] b,
int startB,
int strideB,
int widthB)
This is a forward substitution solver for non-singular upper triangular matrices which are
a sub-matrix inside a larger.
|
public static void invertLower(float[] L,
int m)
Inverts a square lower triangular matrix: L = L-1
L - m - public static void invertLower(float[] L,
float[] L_inv,
int m)
public static void solveL(float[] L,
float[] b,
int n)
Solves for non-singular lower triangular matrices using forward substitution.
b = L-1b
where b is a vector, L is an n by n matrix.
L - An n by n non-singular lower triangular matrix. Not modified.b - A vector of length n. Modified.n - The size of the matrices.public static void solveL(float[] L,
float[] b,
int m,
int n)
L - b - m - n - public static void solveTranL(float[] L,
float[] b,
int n)
This is a forward substitution solver for non-singular lower triangular matrices.
b = (LT)-1b
where b is a vector, L is an n by n matrix.
L is a lower triangular matrix, but it comes up with a solution as if it was an upper triangular matrix that was computed by transposing L.
L - An n by n non-singular lower triangular matrix. Not modified.b - A vector of length n. Modified.n - The size of the matrices.public static void solveU(float[] U,
float[] b,
int n)
This is a forward substitution solver for non-singular upper triangular matrices.
b = U-1b
where b is a vector, U is an n by n matrix.
U - An n by n non-singular upper triangular matrix. Not modified.b - A vector of length n. Modified.n - The size of the matrices.public static void solveU(float[] U,
float[] b,
int sideLength,
int minRow,
int maxRow)
public static void solveU(float[] U,
int startU,
int strideU,
int widthU,
float[] b,
int startB,
int strideB,
int widthB)
This is a forward substitution solver for non-singular upper triangular matrices which are
a sub-matrix inside a larger. The columns of 'b' are solved for individually
b = U-1b
where b is a matrix, U is an n by n matrix.
U - Matrix containing the upper triangle systemstartU - Index of the first element in UstrideU - stride between rowswidthU - How wide the square matrix isb - Matrix containing the solution to the system. Overwritten with the solution.startB - Index of the first element in BstrideB - stride between rowswidthB - How wide the matrix is. Length is the same as U's width