Changeset 1735 for branches/autoquest-core-tasktrees-alignment
- Timestamp:
- 09/05/14 20:50:52 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.