Ignore:
Timestamp:
07/04/14 00:38:41 (10 years ago)
Author:
rkrimmel
Message:

Adding needleman wunsch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java

    r1586 r1587  
    3232 
    3333        private ArrayList<NumberSequence> alignment; 
    34  
    35         private float scoreThreshold; 
    3634 
    3735        /** 
     
    5149                // + submat.getClass() + " Substitution Matrix: " + 
    5250                // submat.getClass().getCanonicalName()); 
    53                 this.scoreThreshold = threshold; 
    5451 
    5552                matrix = new MatrixEntry[length1 + 1][length2 + 1]; 
     
    9390 
    9491                // the first column 
    95                 for (int j = 1; j < length2+1; j++) { 
     92                for (int j = 1; j < length2; j++) { 
    9693                        matrix[0][j].setScore(0); 
    9794                        matrix[0][j].setPrevious(matrix[0][j - 1]); 
     
    10198                // the first row 
    10299 
    103                 for (int j = 1; j < length1+1; j++) { 
     100                for (int j = 1; j < length1; j++) { 
    104101                        matrix[j][0].setScore(0); 
    105102                        matrix[j][0].setPrevious(matrix[j - 1][0]); 
     
    262259                        System.out.format("%5d", input1[i - 1]); 
    263260                System.out.println(); 
    264                 for (int j = 0; j < length2; j++) { 
     261                for (int j = 0; j <= length2; j++) { 
    265262                        if (j > 0) 
    266263                                System.out.format("%5d ", input2[j - 1]); 
     
    268265                                System.out.print("      "); 
    269266                        } 
    270                         for (int i = 0; i < length1; i++) { 
     267                        for (int i = 0; i <= length1; i++) { 
    271268                                        System.out.format("%4.1f ", matrix[i][j].getScore()); 
    272269                        } 
Note: See TracChangeset for help on using the changeset viewer.