RE
- the type for the domain for which equations are to be solved.public class LinSysSolver<RE extends IRingElement<?>>
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
LinSysSolver() |
Modifier and Type | Method and Description |
---|---|
static <RE extends IRingElement<RE>> |
isSolvable(Matrix<RE> a,
Vector<RE> b)
Tests whether a linear equation system (A*x=b) is solvable or not.
|
private static <RE extends IRingElement<RE>> |
isSolvableHelper(Matrix<RE> a,
Vector<RE> b)
Does something quite similar to isSolvable but is used by solve and
solutionSpace
N.B.: In General, this operation will fail, if not all entries are
FieldElements.
|
static <RE extends IRingElement<RE>> |
solutionSpace(Matrix<RE> a,
Vector<RE> b)
Calculates the solution space of a given linear equation system of the
form A*x=b.
|
static <RE extends IRingElement<RE>> |
solve(Matrix<RE> a,
Vector<RE> b)
Calculates a solution of a given linear equation system of the form
A*x=b.
|
private static final long serialVersionUID
public static <RE extends IRingElement<RE>> AffineLinearSubspace<RE> solutionSpace(Matrix<RE> a, Vector<RE> b) throws InvalidOperationException
RE
- the type of the dimensionsa
- coefficient matrixb
- result vectorInvalidOperationException
- if the matrix and vector sizes mismatch.public static <RE extends IRingElement<RE>> Vector<RE> solve(Matrix<RE> a, Vector<RE> b)
RE
- the type of the elements in the matices and vectors.a
- coefficient matrixb
- result vectorInvalidOperationException
- if the matrix and vector sizes mismatch.private static <RE extends IRingElement<RE>> Matrix<RE> isSolvableHelper(Matrix<RE> a, Vector<RE> b)
RE
- the type of the coeffcients.a
- coefficient matrixb
- result vectorpublic static <RE extends IRingElement<RE>> boolean isSolvable(Matrix<RE> a, Vector<RE> b)
RE
- the type of the coefficients.a
- coefficient matrixb
- result vector