JAL-1503 update version in GPL header
[jalview.git] / src / jalview / schemes / ScoreMatrix.java
index e78b92c..8ef7930 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
  * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
  */
 package jalview.schemes;
 
-public class ScoreMatrix
+import jalview.analysis.scoremodels.PairwiseSeqScoreModel;
+import jalview.api.analysis.ScoreModelI;
+
+public class ScoreMatrix extends PairwiseSeqScoreModel implements ScoreModelI
 {
   String name;
+  
+  @Override
+  public String getName()
+  {
+    return name;
+  }
 
   /**
    * reference to integer score matrix
@@ -31,23 +40,31 @@ public class ScoreMatrix
    * 0 for Protein Score matrix. 1 for dna score matrix
    */
   int type;
-
+  /**
+   * 
+   * @param name Unique, human readable name for the matrix
+   * @param matrix Pairwise scores indexed according to appropriate symbol alphabet
+   * @param type 0 for Protein, 1 for NA
+   */
   ScoreMatrix(String name, int[][] matrix, int type)
   {
     this.matrix = matrix;
     this.type = type;
+    this.name = name;
   }
 
+  @Override
   public boolean isDNA()
   {
     return type == 1;
   }
-
+  @Override
   public boolean isProtein()
   {
     return type == 0;
   }
 
+  @Override
   public int[][] getMatrix()
   {
     return matrix;