Changeset 1735
- Timestamp:
- 09/05/14 20:50:52 (10 years ago)
- Location:
- branches
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/TriangleMatrixTest.java
r1652 r1735 9 9 @Test 10 10 public void testSetGet() { 11 TriangleMatrix tm = newTriangleMatrix(3);11 StaticTriangleMatrix tm = new StaticTriangleMatrix(3); 12 12 tm.initialize(0); 13 tm.set(0,1, 3 .0);14 assertTrue(tm.get(1, 0)==3 .0);13 tm.set(0,1, 3); 14 assertTrue(tm.get(1, 0)==3); 15 15 } 16 16 -
branches/autoquest-core-tasktrees-alignment-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManagerTest.java
r1402 r1735 37 37 public class TaskTreeManagerTest { 38 38 39 /** */39 40 40 TaskTreeManager manager; 41 41 -
branches/autoquest-core-tasktrees-alignment-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignmentTest.java
r1693 r1735 28 28 @Test 29 29 public void test_MatchAsSequences() { 30 //TODO: implement test 30 31 Match m1 = new Match(); 31 32 int[] pat1 = new int[]{2,1,3,-1,3,5,4,8,3,1}; … … 37 38 m1.setFirstSequence(ns1); 38 39 m1.setSecondSequence(ns1); 39 40 41 40 } 41 //TODO 42 /* Those test don't work anymore since my method need a gui model for each eventtask 42 43 43 /**44 *45 */46 44 @Test 47 45 public void test_TaskDetection_01() throws Exception { … … 119 117 } 120 118 121 /** 122 * 123 */ 119 124 120 @Test 125 121 public void test_TaskDetection_02() throws Exception { … … 192 188 applySessionScopeRule(SequenceForTaskDetectionRuleAlignment.class, input, output); 193 189 } 190 */ 194 191 195 192 } -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
r1734 r1735 98 98 /** HashMap for keeping track in which sequence which replacement has been performed. 99 99 * Neccessary for updating the indices of other occurrences accordingly */ 100 p ublicHashMap<Integer, List<MatchOccurence>> replacedOccurences;100 private HashMap<Integer, List<MatchOccurence>> replacedOccurences; 101 101 102 102 /** The list of all found matches */ 103 p ublicLinkedList<Match> matchseqs;103 private LinkedList<Match> matchseqs; 104 104 105 105 /** The generated NumberSequences. … … 515 515 executor.awaitTermination(2, TimeUnit.HOURS); 516 516 } catch (final InterruptedException e) { 517 // TODO Auto-generated catch block518 517 e.printStackTrace(); 519 518 } … … 578 577 /** 579 578 * <p> 580 * TODO clarify why this is done 579 * TODO clarify why this is done (in fact, ask Patrick Harms) 581 580 * </p>. 582 581 * … … 646 645 * Match as sequence. 647 646 * 648 * @param appData , Ruleapplication Data needed to keep track of all created 649 * tasks 650 * @param m The match to be converted into a Task 651 * @return The task of the match with an ISequence as it's root 647 * @param appData RuleApplicationData needed to keep track of all created tasks 648 * @param m The match to be converted into a Task 649 * @return The task of the match with an ISequence as its root 652 650 */ 653 651 synchronized public ISequence matchAsSequence(RuleApplicationData appData, … … 692 690 } 693 691 // Both tasks are not equal, we need to insert a selection here. 694 // Check if the next position is not a selection 692 // Now things get complicated. We first need to check 693 // if the next position is not a selection. Then we can just create a selection 694 // of the both Tasks 695 // In the other case (more than one selection following this selection), we want to 696 // create a selection of sequences where each sequence gets the corresponding task of 697 // the its sequence in the pattern. 698 // 695 699 else if (i < (first.length - 1)) { 696 700 … … 840 844 */ 841 845 private void replaceMatches(RuleApplicationData appData) { 842 appData. replacedOccurences = new HashMap<Integer, List<MatchOccurence>>();846 appData.setReplacedOccurences(new HashMap<Integer, List<MatchOccurence>>()); 843 847 844 848 final int matchSeqSize = appData.getMatchseqs().size(); … … 914 918 + " threads"); 915 919 // Prepare parallel search of matchseqs 916 917 920 final int matchSeqSize = appData.getMatchseqs().size(); 918 921 int newThreads = nThreads; … … 1135 1138 } 1136 1139 } 1137 System.out.println("Replacing in sequence"1138 + oc.getSequenceId());1139 1140 synchronized (appData) { 1140 1141 appData.detectedAndReplacedTasks = true; … … 1156 1157 // length of 1157 1158 // instance. (OptionalInstances may be shorter) 1158 1159 1159 synchronized (appData.getReplacedOccurrences().get( 1160 1160 oc.getSequenceId())) {
Note: See TracChangeset
for help on using the changeset viewer.