From: kjvdheide Date: Thu, 26 Oct 2017 22:22:42 +0000 (+0100) Subject: Start of matrix converter X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2fce8a6335c88e579ec0a5c39e1978fd41b07ccf;p=jalview.git Start of matrix converter --- diff --git a/src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java b/src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java deleted file mode 100644 index 6944573..0000000 --- a/src/jalview/ext/archaeopteryx/JalviewMatrixToForesterMatrix.java +++ /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 index 0000000..779d7a3 --- /dev/null +++ b/src/jalview/ext/archaeopteryx/MatrixConverter.java @@ -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; + } + +}