JSci.maths
Class KarhunenLoeve

java.lang.Object
  extended by JSci.maths.KarhunenLoeve

public final class KarhunenLoeve
extends java.lang.Object

This class implements the Karhunen-Loeve expansion.


Field Summary
(package private)  double[][] data
           
 
Constructor Summary
KarhunenLoeve(double[][] v)
           
 
Method Summary
 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)
           
 void setData(double[][] v)
          Careful: doesn't generate a copy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

double[][] data
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 MaximumIterationsExceededException
Returns 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.