Package org.jblas
Class Solve
java.lang.Object
org.jblas.Solve
Solving linear equations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleMatrixpinv(DoubleMatrix A) Computes the pseudo-inverse.static FloatMatrixpinv(FloatMatrix A) Computes the pseudo-inverse.static DoubleMatrixsolve(DoubleMatrix A, DoubleMatrix B) Solves the linear equation A*X = B.static FloatMatrixsolve(FloatMatrix A, FloatMatrix B) Solves the linear equation A*X = B.static DoubleMatrixComputes the Least Squares solution for over or underdetermined linear equations A*X = B In the overdetermined case, when m > n, that is, there are more equations than variables, it computes the least squares solution of X -> ||A*X - B ||_2.static FloatMatrixComputes the Least Squares solution for over or underdetermined linear equations A*X = B In the overdetermined case, when m > n, that is, there are more equations than variables, it computes the least squares solution of X -> ||A*X - B ||_2.static DoubleMatrixSolves the linear equation A*X = B for symmetric and positive definite A.static FloatMatrixSolves the linear equation A*X = B for symmetric and positive definite A.static DoubleMatrixSolves the linear equation A*X = B for symmetric A.static FloatMatrixSolves the linear equation A*X = B for symmetric A.
-
Constructor Details
-
Solve
public Solve()
-
-
Method Details
-
solve
Solves the linear equation A*X = B. -
solveSymmetric
Solves the linear equation A*X = B for symmetric A. -
solvePositive
Solves the linear equation A*X = B for symmetric and positive definite A. -
solveLeastSquares
Computes the Least Squares solution for over or underdetermined linear equations A*X = B In the overdetermined case, when m > n, that is, there are more equations than variables, it computes the least squares solution of X -> ||A*X - B ||_2. In the underdetermined case, when m < n (less equations than variables), there are infinitely many solutions and it computes the minimum norm solution.- Parameters:
A- an (m,n) matrixB- a (m,k) matrix- Returns:
- either the minimum norm or least squares solution.
-
pinv
Computes the pseudo-inverse. Note, this function uses the solveLeastSquares and might produce different numerical solutions for the underdetermined case than matlab.- Parameters:
A- rectangular matrix- Returns:
- matrix P such that A*P*A = A and P*A*P = P.
-
solve
Solves the linear equation A*X = B. -
solveSymmetric
Solves the linear equation A*X = B for symmetric A. -
solvePositive
Solves the linear equation A*X = B for symmetric and positive definite A. -
solveLeastSquares
Computes the Least Squares solution for over or underdetermined linear equations A*X = B In the overdetermined case, when m > n, that is, there are more equations than variables, it computes the least squares solution of X -> ||A*X - B ||_2. In the underdetermined case, when m < n (less equations than variables), there are infinitely many solutions and it computes the minimum norm solution.- Parameters:
A- an (m,n) matrixB- a (m,k) matrix- Returns:
- either the minimum norm or least squares solution.
-
pinv
Computes the pseudo-inverse. Note, this function uses the solveLeastSquares and might produce different numerical solutions for the underdetermined case than matlab.- Parameters:
A- rectangular matrix- Returns:
- matrix P such that A*P*A = A and P*A*P = P.
-