|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.vector.doubles.dense.operation.VectorSpace
public class VectorSpace
A vector space is a set of vectors that are closed under some operations.
A basis is a set of vectors that, in a linear combination, can represent every vector in a given vector space, and such that no element of the set can be represented as a linear combination of the others. In other words, a basis is a linearly independent spanning set.
The orthogonal complement A⊥ of a subspace A of an inner product space V is the set of all vectors in V
that are orthogonal to every vector in A.
Informally, it is called the perp, short for perpendicular complement.
For an m x n matrix A, where m ≥ n,
the orthogonal basis are the orthogonalization of the columns.
The orthogonal complement is A⊥ = Null(A.t()).
| Field Summary | |
|---|---|
double |
epsilon
a precision parameter: when a number |x| ≤ ε, it is considered 0 |
| Constructor Summary | |
|---|---|
VectorSpace(double epsilon,
Vector... elements)
Construct a vector space from an array 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. |
|
VectorSpace(VectorList elements)
Construct a vector space from a list of vectors. |
|
VectorSpace(VectorList elements,
double epsilon)
Construct a vector space from a list of vectors. |
|
| Method Summary | |
|---|---|
VectorList |
basis()
Get a copy of the orthogonal basis. |
VectorList |
complement()
Get a copy of the basis of the orthogonal complement. |
boolean |
isInKernel(Vector b)
Deprecated. Not supported yet. |
boolean |
isSpanned(Vector b)
Check whether a vector is in the span of the the basis. |
Vector |
linearSpan(double... d)
Deprecated. Not supported yet. |
int |
rank()
Get the rank of this vector space. |
Vector |
spanningCoefficients(Vector b)
Find a linear combination of the basis that best approximates a vector in the linear least square sense. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final double epsilon
| Constructor Detail |
|---|
public VectorSpace(VectorList 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(VectorList elements)
elements - a list of vectors
public 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 vectors
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)| Method Detail |
|---|
public int rank()
public VectorList basis()
public VectorList complement()
@Deprecated public Vector linearSpan(double... d)
d - an array of coefficients.
public Vector spanningCoefficients(Vector b)
b - a vector
OLSSolverpublic boolean isSpanned(Vector b)
b - a vector
true iff b is in this vector space@Deprecated public boolean isInKernel(Vector b)
b - a vector
true iff b is in the kernel/nullspace of this vector space
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||