Exemplo n.º 1
0
  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;
  }
Exemplo n.º 2
0
 public double getEigenvalue(int index) {
   return eigenDecomp.getEigenvalue(eigenSort[index]);
 }