Changeset 1649 for branches/autoquest-core-tasktrees-alignment/src
- Timestamp:
- 08/03/14 22:53:27 (10 years ago)
- Location:
- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithm.java
r1620 r1649 19 19 20 20 public abstract ArrayList<Match> getMatches(); 21 22 public double getMaxScore(); 21 23 22 24 void align(NumberSequence input1, NumberSequence input2, -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java
r1620 r1649 102 102 //position of the maximal score of the previous row 103 103 104 for(int j = 2; j < length2;j++) {104 for(int j = 2; j <= length2;j++) { 105 105 if(matrix[i-1][j].getScore() > tempMax) { 106 106 tempMax = matrix[i-1][j].getScore(); … … 122 122 123 123 //The last additional score is not related to a character in the input sequence, it's the total score. Therefore we don't need to save something for it 124 if(i<length1+1)125 {124 //and can end here 125 if(i<length1+1) { 126 126 matrix[i][0].setXvalue(input1[i-1]); 127 127 matrix[i][0].setYvalue(Constants.UNMATCHED_SYMBOL); 128 128 } 129 else { 130 //End after we calculated final score 129 else { 131 130 return; 132 131 } 133 134 135 for (int j = 1; j < length2; j++) { 132 133 134 135 for (int j = 1; j <= length2; j++) { 136 136 double diagScore = matrix[i - 1][j - 1].getScore() + similarity(i, j); 137 137 double upScore = matrix[i][j - 1].getScore() + submat.getGapPenalty(); … … 181 181 // skip the first row and column 182 182 for (int i = 1; i <= length1; i++) { 183 for (int j = 1; j < length2; j++) {183 for (int j = 1; j <= length2; j++) { 184 184 if (matrix[i][j].getScore() > maxScore) { 185 185 maxScore = matrix[i][j].getScore(); … … 373 373 374 374 for (int i = 0; i <= length1+1; i++) { 375 for(int j = 0; j< length2; j++) {375 for(int j = 0; j<= length2; j++) { 376 376 matrix[i][j] = new MatrixEntry(); 377 377 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
r1645 r1649 166 166 .generate(appData.getNumberSequences(), submat, 9); 167 167 168 169 168 170 // Retrieve all matches reached a specific threshold 169 171 Console.traceln(Level.INFO, "retrieving significant sequence pieces"); … … 203 205 for (Iterator<Integer> jt = startpositions.iterator(); jt 204 206 .hasNext();) { 207 int start = jt.next(); 208 System.out.println("Found match "); 209 pattern.getFirstSequence().printSequence(); 210 pattern.getSecondSequence().printSequence(); 211 System.out.println("in sequence " + (j+1) + " at position " + start); 205 212 pattern.addOccurence( 206 new MatchOccurence( jt.next(), j));213 new MatchOccurence(start, j)); 207 214 } 208 215 … … 366 373 } 367 374 appData.getNumber2Task().put(templist.getSequence()[i], taskInstance.getTask()); 375 376 //System.out.println("TaskID: " + taskInstance.getTask().getId()+ " Numbersequence: " + templist.getSequence()[i]); 368 377 } 369 378 //Each NumberSequence is identified by its id, beginning to count at zero 370 templist.setId( appData.getNumberSequences().size());379 templist.setId(sessionNo-1); 371 380 appData.getNumberSequences().add(templist); 372 381 comparator.clearBuffers(); … … 550 559 } 551 560 } 561 for (int i =0;i<sequence.getChildren().size();i++) { 562 System.out.println(sequence.getChildren().get(i)); 563 564 if(sequence.getChildren().get(i).getType() == "selection") { 565 for(int j=0; j< ((ISelection) sequence.getChildren().get(i)).getChildren().size();j++) { 566 System.out.println("\t" +((ISelection) sequence.getChildren().get(i)).getChildren().get(j)); 567 } 568 } 569 } 552 570 return sequence; 553 571 }
Note: See TracChangeset
for help on using the changeset viewer.