jsci.maths
Class KarhunenLoeve
- java.lang.Object
-
- jsci.maths.KarhunenLoeve
-
public final class KarhunenLoeve extends java.lang.ObjectThis class implements the Karhunen-Loeve expansion.
-
-
Constructor Summary
Constructors Constructor and Description KarhunenLoeve(double[][] v)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[][]getData()Careful: doesn't generate a copy.double[][]getEigenvectorArrays()Returns the eigenvectors ordered by the norm of the eigenvalues (from max to min).AbstractDoubleVector[]getEigenvectors()Returns the eigenvectors ordered by the norm of the eigenvalues (from max to min).double[][]getProductMatrix()static double[][]getProductMatrix(double[] v)static double[][]getProductMatrix(double[][] v)voidsetData(double[][] v)Careful: doesn't generate a copy.
-
-
-
Constructor Detail
-
KarhunenLoeve
public KarhunenLoeve(double[][] v)
- Parameters:
v- an array where [i][j] is the jth component of the ith vector.
-
-
Method Detail
-
getProductMatrix
public double[][] getProductMatrix()
-
getProductMatrix
public static double[][] getProductMatrix(double[][] v)
- Parameters:
v- an array where [i][j] is the jth component of the ith vector.
-
getProductMatrix
public static double[][] getProductMatrix(double[] v)
-
getData
public double[][] getData()
Careful: doesn't generate a copy.
-
setData
public void setData(double[][] v)
Careful: doesn't generate a copy.- Parameters:
v- an array where [i][j] is the jth component of the ith vector.
-
getEigenvectors
public AbstractDoubleVector[] getEigenvectors() throws MaximumIterationsExceededException
Returns the eigenvectors ordered by the norm of the eigenvalues (from max to min).- Throws:
MaximumIterationsExceededException- if it can't compute the eigenvectors within the limited number of iterations allowed.
-
getEigenvectorArrays
public double[][] getEigenvectorArrays() throws MaximumIterationsExceededExceptionReturns the eigenvectors ordered by the norm of the eigenvalues (from max to min).- Returns:
- an array where [i][j] is the jth component of the ith eigenvector.
- Throws:
MaximumIterationsExceededException- if it can't compute the eigenvectors within the limited number of iterations allowed.
-
-
DMelt 3.0 © DataMelt by jWork.ORG