Changeset 1654 for branches/autoquest-core-tasktrees-alignment/src
- Timestamp:
- 08/08/14 22:43:30 (10 years ago)
- Location:
- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java
r1630 r1654 60 60 } 61 61 62 62 /* 63 63 public void addOccurencesOf(Match m) { 64 64 LinkedList<MatchOccurence> occ = m.getOccurences(); 65 65 occurences.addAll(occ); 66 66 } 67 */ 67 68 68 69 -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java
r1649 r1654 227 227 } 228 228 229 229 230 NumberSequence ns1 = new NumberSequence(reversed1.length); 230 231 NumberSequence ns2 = new NumberSequence(reversed2.length); … … 304 305 tmpal.setFirstSequence(tmpns1); 305 306 tmpal.setSecondSequence(tmpns2); 306 tmpal.addOccurence(new MatchOccurence(start,alignment.get(0).getId()));307 tmpal.addOccurence(new MatchOccurence(start,alignment.get(1).getId()));307 //tmpal.addOccurence(new MatchOccurence(start,alignment.get(0).getId())); 308 //tmpal.addOccurence(new MatchOccurence(start,alignment.get(1).getId())); 308 309 result.add(tmpal); 309 310 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java
r1645 r1654 14 14 15 15 package de.ugoe.cs.autoquest.tasktrees.temporalrelation; 16 17 import java.util.Iterator; 16 18 17 19 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; … … 93 95 ISequenceInstance subsequence = taskFactory.createNewTaskInstance(model); 94 96 95 97 for (Iterator<ITaskInstance> it = subsequence.iterator();it.hasNext();) { 98 ITaskInstance foo = it.next(); 99 System.out.println(foo); 100 } 96 101 97 102 System.out.println("Got model: " + model.toString()); 98 99 100 103 101 104 -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
r1653 r1654 203 203 if (startpositions.size() > 0) { 204 204 NumberSequence tempns = appData.getNumberSequences().get(j); 205 for(int k=0;k<tempns.getSequence().length;k++) { 206 System.out.println(k + ": " + tempns.getSequence()[k]); 207 } 205 208 206 for (Iterator<Integer> jt = startpositions.iterator(); jt 209 207 .hasNext();) { 210 208 int start = jt.next(); 209 //TODO: Debug Output 211 210 System.out.println("Found match "); 212 211 pattern.getFirstSequence().printSequence(); 213 212 pattern.getSecondSequence().printSequence(); 214 213 System.out.println("in sequence " + (j+1) + " at position " + start); 214 for(int k=0;k<tempns.getSequence().length;k++) { 215 System.out.print(k + ": " + tempns.getSequence()[k] + " "); 216 System.out.println(appData.getNumber2Task().get(tempns.getSequence()[k])); 217 } 215 218 pattern.addOccurence( 216 219 new MatchOccurence(start, j)); … … 225 228 Comparator<Match> comparator = new Comparator<Match>() { 226 229 public int compare(Match m1, Match m2) { 227 return m2.occurenceCount() - m1.occurenceCount(); // use your228 // logic230 return m2.occurenceCount() - m1.occurenceCount(); 231 229 232 } 230 233 }; 231 Collections.sort(matchseqs, comparator);234 //Collections.sort(matchseqs, comparator); 232 235 233 236 … … 276 279 matchseqs.get(i).getFirstSequence().printSequence(); 277 280 matchseqs.get(i).getSecondSequence().printSequence(); 278 System.out.println(" in session number: " + (oc.getSequenceId()+1) + " at position " + oc.getStartindex() + "-" + (oc.getStartindex()+matchseqs.get(i).getFirstSequence().size()));281 System.out.println(" in session number: " + (oc.getSequenceId()+1) + " at position " + (oc.getStartindex()) + "-" + (oc.getStartindex()+matchseqs.get(i).getFirstSequence().size())); 279 282 System.out.println("Printing session: "); 280 283 for(int j=0;j<sessions.get(oc.getSequenceId()).size();j++) { … … 356 359 ITask task; 357 360 List<IUserSession> sessions = appData.getSessions(); 358 int sessionNo = 0; 359 for (IUserSession session : sessions) { 360 Console.traceln(Level.FINE, "handling " + (++sessionNo) + ". " 361 + session); 361 for (int j = 0; j< sessions.size();j++) { 362 IUserSession session = sessions.get(j); 363 362 364 NumberSequence templist = new NumberSequence(session.size()); 363 365 … … 380 382 } 381 383 //Each NumberSequence is identified by its id, beginning to count at zero 382 templist.setId( sessionNo-1);384 templist.setId(j); 383 385 appData.getNumberSequences().add(templist); 384 386 comparator.clearBuffers(); … … 562 564 } 563 565 } 566 567 //TODO: Debug output 564 568 for (int i =0;i<sequence.getChildren().size();i++) { 565 569 System.out.println(sequence.getChildren().get(i));
Note: See TracChangeset
for help on using the changeset viewer.