Class InnerTriangularSolver_FDRB
Contains triangular solvers for inner blocks of a FMatrixRBlock
.
for i=1:m for j=1:i-1 val = 0 for k=j:i-1 val = val - L(i,k) * X(k,j) end x(i,j) = val / L(i,i) end x(i,i) = 1 / L(i,i) end
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
invertLower
(float[] L, float[] L_inv, int m, int offsetL, int offsetL_inv) Inverts a square lower triangular matrix: L = L-1static void
invertLower
(float[] L, int m, int offsetL) Inverts a square lower triangular matrix: L = L-1static void
solveL
(float[] L, float[] b, int m, int n, int strideL, int offsetL, int offsetB) Solves for non-singular lower triangular matrices using forward substitution.static void
solveLTransB
(float[] L, float[] b, int m, int n, int strideL, int offsetL, int offsetB) Solves for non-singular lower triangular matrices using forward substitution.static void
solveTransL
(float[] L, float[] b, int m, int n, int strideL, int offsetL, int offsetB) Solves for non-singular transposed lower triangular matrices using backwards substitution:
B = L-TB
where B is a (m by n) matrix, L is a lower triangular (m by m) matrix.static void
solveTransU
(float[] U, float[] b, int m, int n, int strideU, int offsetU, int offsetB) Solves for non-singular upper triangular matrices using forward substitution.static void
solveU
(float[] U, float[] b, int m, int n, int strideU, int offsetU, int offsetB) Solves for non-singular upper triangular matrices using backwards substitution.
-
Constructor Details
-
InnerTriangularSolver_FDRB
public InnerTriangularSolver_FDRB()
-
-
Method Details
-
invertLower
public static void invertLower(float[] L, float[] L_inv, int m, int offsetL, int offsetL_inv) Inverts a square lower triangular matrix: L = L-1
- Parameters:
L
- Lower triangular matrix being inverted. Not modified.L_inv
- Where the inverse is stored. Can be the same as L. Modified.m
- The number of rows and columns.offsetL
- which index does the L matrix start at.offsetL_inv
- which index does the L_inv matrix start at.
-
invertLower
public static void invertLower(float[] L, int m, int offsetL) Inverts a square lower triangular matrix: L = L-1
- Parameters:
L
- Lower triangular matrix being inverted. Over written with inverted matrix. Modified.m
- The number of rows and columns.offsetL
- which index does the L matrix start at.
-
solveL
public static void solveL(float[] L, float[] b, int m, int n, int strideL, int offsetL, int offsetB) Solves for non-singular lower triangular matrices using forward substitution.
B = L-1B
where B is a (m by n) matrix, L is a lower triangular (m by m) matrix.- Parameters:
L
- An m by m non-singular lower triangular matrix. Not modified.b
- An m by n matrix. Modified.m
- size of the L matrixn
- number of columns in the B matrix.strideL
- number of elements that need to be added to go to the next row in LoffsetL
- initial index in L where the matrix startsoffsetB
- initial index in B where the matrix starts
-
solveTransL
public static void solveTransL(float[] L, float[] b, int m, int n, int strideL, int offsetL, int offsetB) Solves for non-singular transposed lower triangular matrices using backwards substitution:
B = L-TB
where B is a (m by n) matrix, L is a lower triangular (m by m) matrix.- Parameters:
L
- An m by m non-singular lower triangular matrix. Not modified.b
- An m by n matrix. Modified.m
- size of the L matrixn
- number of columns in the B matrix.strideL
- number of elements that need to be added to go to the next row in LoffsetL
- initial index in L where the matrix startsoffsetB
- initial index in B where the matrix starts
-
solveLTransB
public static void solveLTransB(float[] L, float[] b, int m, int n, int strideL, int offsetL, int offsetB) Solves for non-singular lower triangular matrices using forward substitution.
BT = L-1BT
where B is a (n by m) matrix, L is a lower triangular (m by m) matrix.- Parameters:
L
- An m by m non-singular lower triangular matrix. Not modified.b
- An n by m matrix. Modified.m
- size of the L matrixn
- number of columns in the B matrix.offsetL
- initial index in L where the matrix startsoffsetB
- initial index in B where the matrix starts
-
solveU
public static void solveU(float[] U, float[] b, int m, int n, int strideU, int offsetU, int offsetB) Solves for non-singular upper triangular matrices using backwards substitution.
B = U-1B
where B (m by n) is a matrix, U is a (m by m ) upper triangular matrix.
- Parameters:
U
- An m by m non-singular upper triangular matrix. Not modified.b
- An m by n matrix. Modified.m
- size of the L matrixn
- number of columns in the B matrix.offsetU
- initial index in L where the matrix startsoffsetB
- initial index in B where the matrix starts
-
solveTransU
public static void solveTransU(float[] U, float[] b, int m, int n, int strideU, int offsetU, int offsetB) Solves for non-singular upper triangular matrices using forward substitution.
B = U-TB
where B (m by n) is a matrix, U is a (m by m ) upper triangular matrix.
- Parameters:
U
- An m by m non-singular upper triangular matrix. Not modified.b
- An m by n matrix. Modified.m
- size of the L matrixn
- number of columns in the B matrix.offsetU
- initial index in L where the matrix startsoffsetB
- initial index in B where the matrix starts
-