Search in sources :

Example 1 with CommonOps.subtractElement

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);
}
Also used : CyMatrix(edu.ucsf.rbvi.clusterMaker2.internal.api.CyMatrix) Matrix(edu.ucsf.rbvi.clusterMaker2.internal.api.Matrix)

Aggregations

CyMatrix (edu.ucsf.rbvi.clusterMaker2.internal.api.CyMatrix)1 Matrix (edu.ucsf.rbvi.clusterMaker2.internal.api.Matrix)1