JAL-2349 method to get contact intensity for given site
authorJim Procter <jprocter@issues.jalview.org>
Mon, 12 Dec 2016 21:05:18 +0000 (21:05 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 12 Dec 2016 21:05:18 +0000 (21:05 +0000)
src/jalview/datamodel/ContactListI.java
src/jalview/datamodel/ContactMatrixTest.java

index c08c07b..4d5142a 100644 (file)
@@ -11,4 +11,13 @@ public interface ContactListI
 
   Color getColorForScore(int column);
 
+  
+  /**
+   * get a value representing contact at column for this site
+   * 
+   * @param column
+   * @return
+   */
+  double getContactAt(int column);
+
 }
index ab76c76..b978d8f 100644 (file)
@@ -33,6 +33,13 @@ public class ContactMatrixTest implements ContactMatrixI
       public int getContactHeight()
       {
         return width;
+
+      }
+
+      @Override
+      public double getContactAt(int column)
+      {
+        return Math.abs(column - p);
       }
     };
   }