Start of matrix converter
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Thu, 26 Oct 2017 22:22:42 +0000 (23:22 +0100)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Thu, 26 Oct 2017 22:22:42 +0000 (23:22 +0100)
src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java [deleted file]
src/jalview/ext/archaeopteryx/MatrixConverter.java [new file with mode: 0644]

diff --git a/src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java b/src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java
deleted file mode 100644 (file)
index 6944573..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-package jalview.ext.archaeopteryx;
-
-import jalview.math.MatrixI;
-
-import org.forester.evoinference.matrix.distance.DistanceMatrix;
-
-public class JalviewMatrixToForesterMatrix
-{
-
-  public static DistanceMatrix convertJalviewToForester(
-          MatrixI jalviewInput)
-  {
-    return null;
-
-  }
-
-  public static MatrixI convertForesterToJalview(
-          DistanceMatrix foresterInput)
-  {
-    return null;
-
-  }
-
-}
diff --git a/src/jalview/ext/archaeopteryx/MatrixConverter.java b/src/jalview/ext/archaeopteryx/MatrixConverter.java
new file mode 100644 (file)
index 0000000..779d7a3
--- /dev/null
@@ -0,0 +1,50 @@
+package jalview.ext.archaeopteryx;
+
+import jalview.math.MatrixI;
+
+import org.forester.evoinference.matrix.distance.DistanceMatrix;
+
+public class MatrixConverter
+{
+  DistanceMatrix foresterMatrix;
+
+  MatrixI jalviewMatrix;
+
+  public static MatrixConverter createConverter(
+          DistanceMatrix foresterInputMatrix)
+  {
+    MatrixConverter converter = new MatrixConverter();
+    converter.setForesterMatrix(foresterInputMatrix);
+    return converter;
+
+  }
+
+  public static MatrixConverter createConverter(MatrixI jalviewInputMatrix)
+  {
+    MatrixConverter converter = new MatrixConverter();
+    converter.setJalviewMatrix(jalviewInputMatrix);
+    return converter;
+
+  }
+
+  protected DistanceMatrix getForesterMatrix()
+  {
+    return foresterMatrix;
+  }
+
+  protected void setForesterMatrix(DistanceMatrix foresterMatrix)
+  {
+    this.foresterMatrix = foresterMatrix;
+  }
+
+  protected MatrixI getJalviewMatrix()
+  {
+    return jalviewMatrix;
+  }
+
+  protected void setJalviewMatrix(MatrixI jalviewMatrix)
+  {
+    this.jalviewMatrix = jalviewMatrix;
+  }
+
+}