final private SimilarityParamsI similarityParams;
- final private byte dim = 3;
+ final private byte dim = 8;
/*
* outputs
eigenMatrix = pairwiseScores.copy();
ccAnalysis cc = new ccAnalysis(pairwiseScores, dim);
- eigenMatrix = cc.run();
+ eigenMatrix = cc.run().mirrorCol();
} catch (Exception q)
{
public PaSiMapPanel(AlignmentPanel alignPanel, String modelName,
SimilarityParamsI params)
{
- super(3); // dim = 3
+ super(8); // dim = 8
this.av = alignPanel.av;
this.ap = alignPanel;
boolean nucleotide = av.getAlignment().isNucleotide();
return result;
}
+ /**
+ * mirrors columns of the matrix
+ *
+ * @return
+ */
+ @Override
+ public MatrixI mirrorCol()
+ {
+ double[][] result = new double[rows][cols];
+ for (int i = 0; i < rows; i++)
+ {
+ int k = cols - 1; // reverse col
+ for (int j = 0; j < cols; j++)
+ {
+ result[i][k--] = this.getValue(i,j);
+ }
+ }
+ return new Matrix(result);
+ }
}
* if this.cols and v do not have the same length
*/
double[] sumProduct(double[] v);
+
+ /**
+ * mirrors the columns of this matrix
+ *
+ * @return
+ */
+ MatrixI mirrorCol();
}