Changeset 1612 for branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java
- Timestamp:
- 07/14/14 23:27:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java
r1596 r1612 43 43 private SubstitutionMatrix submat; 44 44 45 public SmithWatermanRepeated(int[] input1, int[] input2, SubstitutionMatrix submat,float threshold) { 46 this.input1 = input1; 47 this.input2 = input2; 48 length1 = input1.length; 49 length2 = input2.length; 50 this.submat = submat; 51 52 //System.out.println("Starting SmithWaterman algorithm with a " 53 // + submat.getClass() + " Substitution Matrix: " + submat.getClass().getCanonicalName()); 54 this.scoreThreshold = threshold; 55 56 matrix = new MatrixEntry[length1+2][length2+1]; 57 alignment = new ArrayList<NumberSequence>(); 58 59 for (int i = 0; i <= length1+1; i++) { 60 for(int j = 0; j< length2; j++) { 61 matrix[i][j] = new MatrixEntry(); 62 } 63 } 64 65 66 buildMatrix(); 67 traceback(); 45 public SmithWatermanRepeated() { 46 68 47 } 69 48 … … 374 353 } 375 354 355 @Override 356 public void align(int[] input1, int[] input2, SubstitutionMatrix submat, 357 float threshold) { 358 this.input1 = input1; 359 this.input2 = input2; 360 length1 = input1.length; 361 length2 = input2.length; 362 this.submat = submat; 363 364 //System.out.println("Starting SmithWaterman algorithm with a " 365 // + submat.getClass() + " Substitution Matrix: " + submat.getClass().getCanonicalName()); 366 this.scoreThreshold = threshold; 367 368 matrix = new MatrixEntry[length1+2][length2+1]; 369 alignment = new ArrayList<NumberSequence>(); 370 371 for (int i = 0; i <= length1+1; i++) { 372 for(int j = 0; j< length2; j++) { 373 matrix[i][j] = new MatrixEntry(); 374 } 375 } 376 377 378 buildMatrix(); 379 traceback(); 380 } 381 376 382 }
Note: See TracChangeset
for help on using the changeset viewer.