Merge branch 'kjvdh/features/PhylogenyViewer_tabbedsupport' into merge/2_11_2/kjvdh...
[jalview.git] / src / jalview / math / MatrixI.java
index dd7aaf1..4fe31ea 100644 (file)
@@ -52,7 +52,7 @@ public interface MatrixI
   double getValue(int i, int j);
 
   /**
-   * Sets the value at row i, colum j
+   * Sets the value at row i, column j
    * 
    * @param i
    * @param j
@@ -75,6 +75,14 @@ public interface MatrixI
   MatrixI copy();
 
   /**
+   * Answers all values present in the Matrix ordered by row,column
+   * 
+   * @return the double array containing the values ordered in {row values} per
+   *         column
+   */
+  double[][] getValues();
+
+  /**
    * Returns a new matrix which is the transpose of this one
    * 
    * @return
@@ -116,6 +124,10 @@ public interface MatrixI
 
   double[] getE();
 
+  void setD(double[] v);
+
+  void setE(double[] v);
+
   void print(PrintStream ps, String format);
 
   void printD(PrintStream ps, String format);
@@ -155,4 +167,15 @@ public interface MatrixI
    * @param d
    */
   void multiply(double d);
+
+  /**
+   * Answers true if the two matrices have the same dimensions, and
+   * corresponding values all differ by no more than delta (which should be a
+   * positive value), else false
+   * 
+   * @param m2
+   * @param delta
+   * @return
+   */
+  boolean equals(MatrixI m2, double delta);
 }