use of edu.ucsf.rbvi.clusterMaker2.internal.api.CommonOps.subtractElement in project clusterMaker2 by RBVI.
the class RunPCoA method sampleToEigenSpace.
public double[] sampleToEigenSpace(Matrix V_t, Matrix sampleData, Matrix mean, int row) {
Matrix s = distanceMatrix.like(distanceMatrix.nColumns(), 1);
for (int col = 0; col < distanceMatrix.nColumns(); col++) s.setValue(col, 0, sampleData.doubleValue(row, col));
CommonOps.subtractElement(s, mean);
Matrix r = CommonOps.multiplyMatrix(V_t.copy(), s);
return r.getColumn(0);
}