DoubleDistance distance = distFunc.distance(cluster.centroid, database.get(id));
DistanceResultPair<DoubleDistance> qr = new GenericDistanceResultPair<DoubleDistance>(distance, id);
results.add(qr);
}
Collections.sort(results);
PCAResult pcares = pca.processQueryResult(results, database);
SortedEigenPairs eigenPairs = pcares.getEigenPairs();
return eigenPairs.reverseEigenVectors(dim);
// Used to be just this:
// Matrix pcaMatrix = pca.pcaMatrixResults(database, results);