public class VectorSpace
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
VectorSpace(double epsilon,
Vector... elements)
Construct a vector space from an array of vectors.
|
VectorSpace(java.util.List<Vector> elements)
Construct a vector space from a list of vectors.
|
VectorSpace(java.util.List<Vector> elements,
double epsilon)
Construct a vector space from a list of vectors.
|
VectorSpace(Matrix A)
Construct a vector space from a matrix (a set of column vectors).
|
VectorSpace(Matrix A,
double epsilon)
Construct a vector space from a matrix (a set of column vectors).
|
VectorSpace(Vector... elements)
Construct a vector space from an array of vectors.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Vector> |
getBasis()
Get the orthogonal basis.
|
java.util.List<Vector> |
getComplement()
Get the basis of the orthogonal complement.
|
Vector |
getLinearSpan(double... d)
Deprecated.
Not supported yet.
|
Vector |
getSpanningCoefficients(Vector b)
Find a linear combination of the basis that best approximates a vector in the least square sense.
|
boolean |
isInKernel(Vector b)
Deprecated.
Not supported yet.
|
boolean |
isSpanned(Vector b)
Check whether a vector is in the span of the basis.
|
int |
rank()
Get the rank of this vector space.
|
public VectorSpace(Matrix A, double epsilon)
A - a matrix, i.e., (a set of column vectors)epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0.
The ε is used to determine the numerical rank of the linear space.public VectorSpace(Matrix A)
A - a matrix, i.e., (a set of column vectors)public VectorSpace(java.util.List<Vector> elements, double epsilon)
elements - a list of vectorsepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0.
The ε is used to determine the numerical rank of the linear space.public VectorSpace(java.util.List<Vector> elements)
elements - a list of vectorspublic VectorSpace(double epsilon,
Vector... elements)
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0.
The ε is used to determine the numerical rank of the linear space.elements - a list of vectorspublic VectorSpace(Vector... elements)
elements - a list of vectorspublic int rank()
public java.util.List<Vector> getBasis()
public java.util.List<Vector> getComplement()
@Deprecated public Vector getLinearSpan(double... d)
d - coefficientspublic Vector getSpanningCoefficients(Vector b)
b - a vectornull if b is not in the vector spaceOLSSolverpublic boolean isSpanned(Vector b)
b - a vectortrue if b is in this vector space@Deprecated public boolean isInKernel(Vector b)
b - a vectortrue if b is in the kernel/nullspace of this vector space