JAL-1123 - make clear where off-by-one error was occuring (patched problem in previou...
[jalview.git] / src / jalview / viewmodel / PCAModel.java
index 30f8783..6002c8a 100644 (file)
@@ -97,14 +97,15 @@ public class PCAModel
 
   /**
    * update the 2d coordinates for the list of points to the given dimensions
-   * Principal dimension is getTop(). Next greated eigenvector is getTop()-1.
-   * Note - pca.getComponents starts counting the spectrum from zero rather than one, so getComponents(dimN ...)  == updateRcView(dimN+1 ..)  
+   * Principal dimension is getTop(). Next greatest eigenvector is getTop()-1.
+   * Note - pca.getComponents starts counting the spectrum from rank-2 to zero, rather than rank-1, so getComponents(dimN ...)  == updateRcView(dimN+1 ..)  
    * @param dim1 
    * @param dim2
    * @param dim3
    */
   public void updateRcView(int dim1, int dim2, int dim3)
   {
+    // note: actual indices for components are dim1-1, etc (patch for JAL-1123)
     float[][] scores = pca.getComponents(dim1-1, dim2-1, dim3-1, 100);
 
     for (int i = 0; i < pca.getM().rows; i++)