|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.math.linearalgebra.SortedEigenPairs
public class SortedEigenPairs
Helper class which encapsulates an array of eigenpairs (i.e. an array of eigenvectors and their corresponding eigenvalues). This class is used to sort eigenvectors (and -values).
Field Summary | |
---|---|
private EigenPair[] |
eigenPairs
The array of eigenpairs. |
Constructor Summary | |
---|---|
private |
SortedEigenPairs()
Creates a new empty SortedEigenPairs object. |
|
SortedEigenPairs(EigenvalueDecomposition evd,
boolean ascending)
Creates a new SortedEigenPairs object from the specified eigenvalue decomposition. |
|
SortedEigenPairs(List<EigenPair> eigenPairs)
Creates a new SortedEigenPairs object from the specified list. |
Method Summary | |
---|---|
SortedEigenPairs |
copy()
Returns a deep copy of this object |
double[] |
eigenValues()
Returns the sorted eigenvalues. |
Matrix |
eigenVectors()
Returns the sorted eigenvectors. |
Matrix |
eigenVectors(int n)
Returns the first n sorted eigenvectors as a matrix. |
EigenPair |
getEigenPair(int index)
Returns the eigenpair at the specified index. |
Matrix |
reverseEigenVectors(int n)
Returns the last n sorted eigenvectors as a matrix. |
int |
size()
Returns the number of the eigenpairs. |
String |
toString()
Returns a string representation of this EigenPair. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private EigenPair[] eigenPairs
Constructor Detail |
---|
private SortedEigenPairs()
public SortedEigenPairs(EigenvalueDecomposition evd, boolean ascending)
evd
- the underlying eigenvalue decompositionascending
- a boolean that indicates ascending orderpublic SortedEigenPairs(List<EigenPair> eigenPairs)
eigenPairs
- the eigenpairs to be sortedMethod Detail |
---|
public double[] eigenValues()
public Matrix eigenVectors()
public Matrix eigenVectors(int n)
n
sorted eigenvectors as a matrix.
n
- the number of eigenvectors (columns) to be returned
n
sorted eigenvectorspublic Matrix reverseEigenVectors(int n)
n
sorted eigenvectors as a matrix.
n
- the number of eigenvectors (columns) to be returned
n
sorted eigenvectorspublic EigenPair getEigenPair(int index)
index
- the index of the eigenpair to be returned
public int size()
public String toString()
toString
in class Object
public SortedEigenPairs copy()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |