mikera.matrixx.solve
Class Linear
- java.lang.Object
-
- mikera.matrixx.solve.Linear
-
public class Linear extends java.lang.ObjectClass providing liner solver algorithms that find the solution to systems of the form: A.x = b
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static AMatrixsolve(AMatrix A, AMatrix B)A general linear system solver, For a matrix A, returns a matrix whose each column is the solution to the equation A.x = b, where b is the corresponding column of B.static AVectorsolve(AMatrix A, AVector b)A general linear system solver, Returns the solution to the equation A.x = b, returns null if A is square and has no unique solution.static AMatrixsolveLeastSquares(AMatrix A, AMatrix B)Returns the least squares solution to the equation A.X = B Use this in the case of over-determined (more equations than unknowns) or under-determined (more unknowns than equations)static AVectorsolveLeastSquares(AMatrix A, AVector b)Returns the least squares solution to the equation A.x = b Use this in the case of over-determined (more equations than unknowns) or under-determined (more unknowns than equations)
-
-
-
Method Detail
-
solveLeastSquares
public static AVector solveLeastSquares(AMatrix A, AVector b)
Returns the least squares solution to the equation A.x = b Use this in the case of over-determined (more equations than unknowns) or under-determined (more unknowns than equations)- Parameters:
A-b-- Returns:
- AVector x
-
solveLeastSquares
public static AMatrix solveLeastSquares(AMatrix A, AMatrix B)
Returns the least squares solution to the equation A.X = B Use this in the case of over-determined (more equations than unknowns) or under-determined (more unknowns than equations)- Parameters:
A-B-- Returns:
- AMatrix X
-
solve
public static AVector solve(AMatrix A, AVector b)
A general linear system solver, Returns the solution to the equation A.x = b, returns null if A is square and has no unique solution.- Parameters:
A-b-- Returns:
-
solve
public static AMatrix solve(AMatrix A, AMatrix B)
A general linear system solver, For a matrix A, returns a matrix whose each column is the solution to the equation A.x = b, where b is the corresponding column of B. Returns null if A is square and equations don't have solutions.- Parameters:
A-B-- Returns:
-
-
DMelt 3.0 © DataMelt by jWork.ORG