Changeset 1654
- Timestamp:
- 08/08/14 22:43:30 (10 years ago)
- Location:
- branches
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeatedTest.java
r1649 r1654 24 24 AlignmentAlgorithm testalignment1 = AlignmentAlgorithmFactory 25 25 .create(); 26 27 assertNotNull(testalignment1); 26 28 testalignment1.align(ns1, ns2,submat,5); 27 29 … … 44 46 AlignmentAlgorithm testalignment1 = AlignmentAlgorithmFactory 45 47 .create(); 48 assertNotNull(testalignment1); 46 49 testalignment1.align(ns1, ns2,submat,5); 47 50 assertTrue(testalignment1.getAlignmentScore()==5); … … 63 66 AlignmentAlgorithm testalignment1 = AlignmentAlgorithmFactory 64 67 .create(); 68 assertNotNull(testalignment1); 65 69 testalignment1.align(ns1, ns2,submat,4); 66 70 testalignment1.printDPMatrix(); … … 90 94 AlignmentAlgorithm testalignment1 = AlignmentAlgorithmFactory 91 95 .create(); 96 assertNotNull(testalignment1); 92 97 testalignment1.align(ns1, ns2,submat,3); 93 //assertTrue(testalignment1.getAlignmentScore()==7);98 assertTrue(testalignment1.getAlignmentScore()==1.0); 94 99 95 100 } -
branches/autoquest-core-tasktrees-alignment-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignmentTest.java
r1650 r1654 97 97 "}"; 98 98 99 applySessionScopeRule(SequenceForTaskDetectionRule .class, input, output);99 applySessionScopeRule(SequenceForTaskDetectionRuleAlignment.class, input, output); 100 100 } 101 101 … … 171 171 "}"; 172 172 173 applySessionScopeRule(SequenceForTaskDetectionRule .class, input, output);173 applySessionScopeRule(SequenceForTaskDetectionRuleAlignment.class, input, output); 174 174 } 175 175 -
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.