public class Kernel extends Object
Ax = bwe solve
T * A = Uand then
x = T * bwhere x is a particular solution.
Modifier and Type | Class and Description |
---|---|
static class |
Kernel.Method
These are the available methods to compute kernel basis.
|
Constructor and Description |
---|
Kernel(Matrix A)
Construct the kernel of a matrix.
|
Kernel(Matrix A,
Kernel.Method method,
double epsilon)
Construct the kernel of a matrix.
|
Modifier and Type | Method and Description |
---|---|
List<Vector> |
basis()
Get the kernel basis.
|
Map<Integer,Vector> |
basisAndFreeVars()
Get the kernel basis and the associated free variables for each basis/column.
|
boolean |
isZero()
Check if the kernel has zero dimension, that is, if A has full rank.
|
int |
nullity()
Get the nullity of A.
|
int |
rank()
Get the rank of A.
|
Matrix |
T()
Get the transformation matrix, T, such that T * A = U.
|
Matrix |
U()
Get the upper triangular matrix U, such that T * A = U.
|
public Kernel(Matrix A, Kernel.Method method, double epsilon)
A
- a matrixmethod
- the kernel computation methodepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0;
the ε is used to determine the numerical rank of the linear spacepublic Kernel(Matrix A)
A
- a matrixpublic int nullity()
public int rank()
public Map<Integer,Vector> basisAndFreeVars()
Kernel.Method.GAUSSIAN_JORDAN_ELIMINATION
.
Using this process, a free variable corresponds to an entry '1' in a column.
For the example in Wikipedia,
x3 (the 3rd variable) is a free variable, and it corresponds to [3,-5,1,0,0,0]t.
If the kernel basis is computed using a different method, call basis()
instead.public boolean isZero()
true
if the kernel is nullpublic Matrix T()
x = T * bwhere x is a particular solution.
public Matrix U()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.