jsat.linear
Class LUPDecomposition
- java.lang.Object
-
- jsat.linear.LUPDecomposition
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class LUPDecomposition extends java.lang.Object implements java.lang.Cloneable, java.io.SerializableThis class uses the LUP decomposition of a matrix to provide efficient methods for solving A x = b, as well as computing the determinant of A.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description LUPDecomposition(Matrix A)LUPDecomposition(Matrix A, java.util.concurrent.ExecutorService threadpool)LUPDecomposition(Matrix L, Matrix U, Matrix P)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static MatrixbackSub(Matrix U, Matrix y)Solves for the matrix x such that U x = ystatic MatrixbackSub(Matrix U, Matrix y, java.util.concurrent.ExecutorService threadpool)Solves for the matrix x such that U x = ystatic VecbackSub(Matrix U, Vec y)Solves for the vector x such that U x = yLUPDecompositionclone()doubledet()static MatrixforwardSub(Matrix L, Matrix b)Solves for the matrix x such that L x = bstatic MatrixforwardSub(Matrix L, Matrix b, java.util.concurrent.ExecutorService threadpool)Solves for the matrix x such that L x = bstatic VecforwardSub(Matrix L, Vec b)Solves for the vector x such that L x = bbooleanisSquare()Matrixsolve(Matrix B)Matrixsolve(Matrix B, java.util.concurrent.ExecutorService threadpool)Vecsolve(Vec b)
-
-
-
Constructor Detail
-
LUPDecomposition
public LUPDecomposition(Matrix A)
-
LUPDecomposition
public LUPDecomposition(Matrix A, java.util.concurrent.ExecutorService threadpool)
-
-
Method Detail
-
isSquare
public boolean isSquare()
- Returns:
- true if the original matrix A, from which this factorization is from, is a square matrix
-
det
public double det()
- Returns:
- the determinant of the original Matrix A, |A|
-
clone
public LUPDecomposition clone()
- Overrides:
clonein classjava.lang.Object
-
forwardSub
public static Vec forwardSub(Matrix L, Vec b)
Solves for the vector x such that L x = b- Parameters:
L- a lower triangular matrixb- a vector whos length is equal to the rows in L- Returns:
- x such that L x = b
-
forwardSub
public static Matrix forwardSub(Matrix L, Matrix b)
Solves for the matrix x such that L x = b- Parameters:
L- a lower triangular matrixb- a matrix with the same number of rows as L- Returns:
- x such that L x = b
-
forwardSub
public static Matrix forwardSub(Matrix L, Matrix b, java.util.concurrent.ExecutorService threadpool)
Solves for the matrix x such that L x = b- Parameters:
L- a lower triangular matrixb- a matrix with the same number of rows as Lthreadpool- source of threads for the parallel computation- Returns:
- x such that L x = b
-
backSub
public static Vec backSub(Matrix U, Vec y)
Solves for the vector x such that U x = y- Parameters:
U- an upper triangular matrixy- a vector whos length is equal to the rows in U- Returns:
- x such that U x = y
-
backSub
public static Matrix backSub(Matrix U, Matrix y)
Solves for the matrix x such that U x = y- Parameters:
U- an upper triangular matrixy- a matrix with the same number of rows as U- Returns:
- x such that U x = y
-
backSub
public static Matrix backSub(Matrix U, Matrix y, java.util.concurrent.ExecutorService threadpool)
Solves for the matrix x such that U x = y- Parameters:
U- an upper triangular matrixy- a matrix with the same number of rows as Uthreadpool- source of threads for the parallel computation- Returns:
- x such that U x = y
-
-
DataMelt 3.0 © DataMelt by jWork.ORG