public double[] getPrincipalCoordinate(int index) { if (index > numberOfPositiveEigenvalues - 1) return null; double eval = Math.sqrt(eigenDecomp.getEigenvalue(eigenSort[index])); int ntaxa = myDistanceMatrix.numberOfTaxa(); double[] pc = new double[ntaxa]; for (int i = 0; i < ntaxa; i++) pc[i] = eigenVectors.get(i, eigenSort[index]) * eval; return pc; }
public double getEigenvalue(int index) { return eigenDecomp.getEigenvalue(eigenSort[index]); }