From 1b929b92d3e782165fb17776a6fadd8aa447c760 Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Fri, 27 Oct 2017 16:47:28 +0100 Subject: [PATCH] JAL-2795 Added get and set values to the converted matrix --- forester | 2 +- .../{MergedMatrix.java => ForesterMatrix.java} | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) rename src/jalview/ext/archaeopteryx/{MergedMatrix.java => ForesterMatrix.java} (72%) diff --git a/forester b/forester index 26d8d47..d62c120 160000 --- a/forester +++ b/forester @@ -1 +1 @@ -Subproject commit 26d8d47ed32a0eb9bd43c409d0e26ff13570b246 +Subproject commit d62c120f4c6fb10f20abaa929514d980fcea9671 diff --git a/src/jalview/ext/archaeopteryx/MergedMatrix.java b/src/jalview/ext/archaeopteryx/ForesterMatrix.java similarity index 72% rename from src/jalview/ext/archaeopteryx/MergedMatrix.java rename to src/jalview/ext/archaeopteryx/ForesterMatrix.java index 41855de..b7b3030 100644 --- a/src/jalview/ext/archaeopteryx/MergedMatrix.java +++ b/src/jalview/ext/archaeopteryx/ForesterMatrix.java @@ -1,9 +1,18 @@ package jalview.ext.archaeopteryx; +import jalview.math.MatrixI; + import org.forester.evoinference.matrix.distance.DistanceMatrix; -public class MergedMatrix implements DistanceMatrix +public class ForesterMatrix implements DistanceMatrix { + private MatrixI jalviewMatrix; + + public ForesterMatrix(MatrixI jalviewInputMatrix) + { + this.jalviewMatrix = jalviewInputMatrix; + + } @Override public String getIdentifier(int i) @@ -15,22 +24,19 @@ public class MergedMatrix implements DistanceMatrix @Override public int getIndex(String identifier) { - // TODO Auto-generated method stub return 0; } @Override public int getSize() { - // TODO Auto-generated method stub return 0; } @Override public double getValue(int col, int row) { - // TODO Auto-generated method stub - return 0; + return jalviewMatrix.getValue(row, col); } @Override @@ -43,7 +49,7 @@ public class MergedMatrix implements DistanceMatrix @Override public void setValue(int col, int row, double distance) { - // TODO Auto-generated method stub + jalviewMatrix.setValue(row, col, distance); } -- 1.7.10.2