Changeset 1749 for branches/autoquest-core-tasktrees-alignment/src
- Timestamp:
- 09/16/14 18:31:46 (10 years ago)
- Location:
- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ObjectDistanceSubstitionMatrix.java
r1748 r1749 7 7 import java.util.Collection; 8 8 import java.util.HashMap; 9 import java.util.HashSet;10 9 import java.util.Iterator; 11 10 import java.util.LinkedList; -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java
r1747 r1749 66 66 final ISequenceInstance subsequence = taskFactory 67 67 .createNewTaskInstance(model); 68 69 //System.out.println("STARTINDEX: " + startIndex);70 //System.out.println("PRINTING SEQUENCE: ");71 //for(int i =0; i< parent.size();i++) {72 //System.out.println(i + ": " +parent.get(i));73 //}68 /* 69 System.out.println("STARTINDEX: " + startIndex); 70 System.out.println("PRINTING SEQUENCE: "); 71 for(int i =0; i< parent.size();i++) { 72 System.out.println(i + ": " +parent.get(i)); 73 } 74 74 System.out.println(); 75 75 … … 105 105 } 106 106 System.out.println(); 107 107 */ 108 108 // TODO: This is dirty, return this in addition with the sequence 109 109 // instance instead -
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
r1747 r1749 25 25 import java.util.List; 26 26 import java.util.Map; 27 import java.util.PriorityQueue;28 27 import java.util.Queue; 29 28 import java.util.Set; … … 73 72 74 73 /** The n threads. */ 75 //public static int nThreads = Runtime.getRuntime().availableProcessors() - 1;76 public static int nThreads = 1;74 public static int nThreads = Runtime.getRuntime().availableProcessors() - 1; 75 //public static int nThreads = 1; 77 76 78 77 /** The iteration. */ 79 78 private int iteration = 0; 80 79 81 private int maxIterations = 1; 80 private int maxIterations = 10 81 ; 82 82 83 83 private static int alignmentThreshold = 9; … … 148 148 149 149 Console.traceln(Level.INFO, "generating substitution matrix from " + 150 appData.get UniqueTasks().size() + " unique tasks");150 appData.getNumber2Task().size() + " unique tasks"); 151 151 appData.getStopWatch().start("substitution matrix"); 152 appData.getSubmat().generate(appData.get UniqueTasks());152 appData.getSubmat().generate(appData.getNumber2Task().values()); 153 153 appData.getStopWatch().stop("substitution matrix"); 154 154 … … 358 358 if (task == null) { 359 359 uniqueTasks.addSymbol(taskInstance, taskInstance.getTask()); 360 appData.getUniqueTasks().add(taskInstance.getTask());361 360 appData.getNumber2Task().put(taskInstance.getTask().getId(), 362 361 taskInstance.getTask()); … … 372 371 appData.getStopWatch().stop("harmonizing event tasks"); 373 372 Console.traceln(Level.INFO, "harmonized " + unifiedTasks + " task occurrences (still " + 374 appData.getUniqueTasks().size() + " different tasks)");373 uniqueTasks.size() + " different tasks)"); 375 374 376 375 appData.getStopWatch().dumpStatistics(System.out); … … 708 707 e.printStackTrace(); 709 708 } 709 appData.getPreparedTasks().clear(); 710 710 } 711 711 … … 1008 1008 public void run() { 1009 1009 for (int i = from; i <= to; i++) { 1010 System.out.println("Replacing in SEQUENCE " + i);1010 //System.out.println("Replacing in SEQUENCE " + i); 1011 1011 /* 1012 1012 * HashMap for keeping track in which sequence which replacement has been performed. … … 1062 1062 1063 1063 1064 System.out.println("Replacing in Sequence " + oc.getSequenceId() +1065 " at position " + oc.getStartindex() + " till " + oc.getEndindex());1064 //System.out.println("Replacing in Sequence " + oc.getSequenceId() + 1065 // " at position " + oc.getStartindex() + " till " + oc.getEndindex()); 1066 1066 final ISequenceInstance sequenceInstances = 1067 1067 RuleUtils.createNewSubSequenceInRange(appData.getSessions() … … 1116 1116 private final HashMap<Integer, ITask> number2task; 1117 1117 1118 /**1119 * The unique tasks, keeps track about all unique tasks TODO: We Actually just need1120 * number2task here, this structure can be removed in the future.1121 */1122 private final HashSet<ITask> uniqueTasks;1123 1118 1124 1119 /** … … 1168 1163 this.sessions = sessions; 1169 1164 numberseqs = new ArrayList<NumberSequence>(); 1170 uniqueTasks = new HashSet<ITask>();1171 1165 number2task = new HashMap<Integer, ITask>(); 1172 1166 stopWatch = new StopWatch(); … … 1271 1265 1272 1266 /** 1273 * Gets the unique tasks.1274 *1275 * @return the unique tasks1276 */1277 private HashSet<ITask> getUniqueTasks() {1278 return uniqueTasks;1279 }1280 1281 /**1282 1267 * New task created. 1283 1268 * … … 1295 1280 */ 1296 1281 synchronized private void resetNewlyCreatedTasks() { 1297 uniqueTasks.addAll(newTasks);1298 1282 newTasks.clear(); 1299 1283 }
Note: See TracChangeset
for help on using the changeset viewer.