package jsci.maths;

import jsci.maths.matrices.DoubleSquareMatrix;
import jsci.maths.vectors.AbstractDoubleVector;
import jsci.maths.vectors.DoubleVector;

/**
* This class implements the Karhunen-Loeve expansion.
* @author Daniel Lemire
*/
public final class KarhunenLoeve {
	double[][] data;

	/**
	 * @param v an array where [i][j] is the jth component of the ith vector.
	*/
	public KarhunenLoeve(double[][] v) {
		setData(v);
	}
        public double[][] getProductMatrix() {
                return(getProductMatrix(data));
        }
        private static double[][] vectorToSquare (double[] v) {
                double[][] ans=new double[v.length][v.length];
                for(int k=0;k 

Ads help maintain this website.