Changeset 1555 for branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java
- Timestamp:
- 05/25/14 16:51:10 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java
r1554 r1555 69 69 this.submat = submat; 70 70 71 System.out.println("Starting SmithWaterman algorithm with a "72 + submat.getClass() + " Substitution Matrix: " + submat.getClass().getCanonicalName());71 //System.out.println("Starting SmithWaterman algorithm with a " 72 // + submat.getClass() + " Substitution Matrix: " + submat.getClass().getCanonicalName()); 73 73 scoreThreshold = 20; 74 74 score = new double[length1 + 1][length2 + 1]; … … 90 90 private double similarity(int i, int j) { 91 91 if (i == 0 || j == 0) { 92 // it's a gap (indel)92 // it's a gap 93 93 return submat.getGapPenalty(); 94 94 } … … 97 97 // return (input1[i - 1] == input2[j - 1]) ? MATCH_SCORE : 98 98 // MISMATCH_SCORE; 99 return submat.getDistance(i - 1, j - 1);99 return submat.getDistance(input1[i - 1], input2[j - 1]); 100 100 } 101 101 … … 279 279 */ 280 280 public void printDPMatrix() { 281 System.out.print(" ");281 System.out.print(" "); 282 282 for (int j = 1; j <= length2; j++) 283 System.out. print(" " +input2[j - 1]);283 System.out.format("%5d", input2[j - 1]); 284 284 System.out.println(); 285 285 for (int i = 0; i <= length1; i++) { 286 286 if (i > 0) 287 System.out.print(input1[i - 1] + " "); 288 else 289 System.out.print(" "); 287 System.out.format("%5d ",input1[i - 1]); 288 else{ 289 System.out.print(" "); 290 } 290 291 for (int j = 0; j <= length2; j++) { 291 System.out. print(score[i][j] + " ");292 System.out.format("%4.1f ",score[i][j]); 292 293 } 293 294 System.out.println();
Note: See TracChangeset
for help on using the changeset viewer.