Changeset 1401 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java
- Timestamp:
- 02/26/14 17:12:53 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java
r1356 r1401 38 38 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 39 39 import de.ugoe.cs.autoquest.usageprofiles.SymbolMap; 40 import de.ugoe.cs.autoquest.usageprofiles.Trie; 40 41 import de.ugoe.cs.autoquest.usageprofiles.TrieProcessor; 41 42 import de.ugoe.cs.util.StopWatch; … … 44 45 /** 45 46 * <p> 46 * TODO comment 47 * This class implements the major rule for creating task trees based on a set of recorded 48 * user sessions. For this, it first harmonizes all tasks. This eases later comparison. Then it 49 * searches the sessions for iterations and replaces them accordingly. Then it searches for sub 50 * sequences being the longest and occurring most often. For each found sub sequence, it replaces 51 * the occurrences by creating appropriate {@link ISequence}s. Afterwards, again searches for 52 * iterations and then again for sub sequences until no more replacements are done. 53 * </p> 54 * <p> 55 * For determining the longest sequence occurring most often, the implementation uses a 56 * {@link Trie}. The depth of the tree is initially 3. If the algorithm has a longest sequence 57 * occurring most often whose length is equal to the depth of the trie, it recalculates the trie 58 * with an increased depth. 47 59 * </p> 48 60 * … … 54 66 * <p> 55 67 * the task factory to be used for creating substructures for the temporal 56 * relationships identified during rul e68 * relationships identified during rul application 57 69 * </p> 58 70 */ … … 68 80 /** 69 81 * <p> 70 * the task comparator to be used for comparing tasks for preparation 82 * the task handling strategy to be used for comparing tasks for preparation, i.e., before 83 * the tasks are harmonized 71 84 * </p> 72 85 */ … … 75 88 /** 76 89 * <p> 77 * the task comparatorto be used for comparing tasks during iteration detection an trie78 * generation 90 * the task handling strategy to be used for comparing tasks during iteration detection an trie 91 * generation, i.e., after the tasks are harmonized 79 92 * </p> 80 93 */ … … 83 96 /** 84 97 * <p> 85 * instantiates the rule and initializes it with a task equality rule manager and the minimal 86 * task equality identified sublist must have to consider them as iterated. 98 * instantiates the rule and initializes it with a task equality to be considered when 99 * comparing tasks as well as a task factory and builder to be used for creating task 100 * structures. 87 101 * </p> 102 * 103 * @param minimalTaskEquality the task equality to be considered when comparing tasks 104 * @param taskFactory the task factory to be used for creating substructures 105 * @param taskBuilder the task builder to be used for creating substructures 88 106 */ 89 107 SequenceForTaskDetectionRule(TaskEquality minimalTaskEquality, … … 151 169 /** 152 170 * <p> 153 * TODO: comment 171 * harmonizes the event task instances by unifying tasks. This is done, as initially the 172 * event tasks being equal with respect to the considered task equality are distinct objects. 173 * The comparison of these distinct objects is more time consuming than comparing the object 174 * references. 154 175 * </p> 155 176 * 156 * @param appData 177 * @param appData the rule application data combining all data used for applying this rule 157 178 */ 158 179 private void harmonizeEventTaskInstancesModel(RuleApplicationData appData) { … … 194 215 195 216 /** 196 * @param appData 217 * <p> 218 * searches for direct iterations of single tasks in all sequences and replaces them with 219 * {@link IIteration}s, respectively appropriate instances. Also all single occurrences of 220 * a task that is iterated somewhen are replaced with iterations to have again an efficient 221 * way for task comparisons. 222 * </p> 223 * 224 * @param appData the rule application data combining all data used for applying this rule 197 225 */ 198 226 private void detectAndReplaceIterations(RuleApplicationData appData) { … … 213 241 214 242 /** 215 * 243 * <p> 244 * searches the provided sessions for task iterations. If a task is iterated, it is added 245 * to the returned set. 246 * </p> 247 * 248 * @param the session to search for iterations in 249 * 250 * @return a set of tasks being iterated somewhere 216 251 */ 217 252 private Set<ITask> searchIteratedTasks(List<IUserSession> sessions) { … … 232 267 233 268 /** 269 * <p> 270 * replaces all occurrences of all tasks provided in the set with iterations 271 * </p> 234 272 * 273 * @param iteratedTasks the tasks to be replaced with iterations 274 * @param sessions the sessions in which the tasks are to be replaced 275 * @param appData the rule application data combining all data used for applying this rule 235 276 */ 236 277 private void replaceIterationsOf(Set<ITask> iteratedTasks, … … 288 329 289 330 /** 290 * 331 * <p> 332 * TODO clarify why this is done 333 * </p> 291 334 */ 292 335 private void harmonizeIterationInstancesModel(IIteration iteration, … … 345 388 346 389 /** 347 * @param appData 390 * TODO go on commenting 391 * @param appData the rule application data combining all data used for applying this rule 348 392 */ 349 393 private void detectAndReplaceTasks(RuleApplicationData appData) { … … 365 409 366 410 /** 367 * @ return411 * @param appData the rule application data combining all data used for applying this rule 368 412 */ 369 413 private void getSequencesOccuringMostOften(RuleApplicationData appData) { … … 462 506 463 507 /** 464 * @param parent 465 * @return 508 * @param appData the rule application data combining all data used for applying this rule 466 509 */ 467 510 private void createNewTrie(RuleApplicationData appData) { … … 483 526 484 527 /** 485 * @param appData 528 * @param appData the rule application data combining all data used for applying this rule 486 529 */ 487 530 private void replaceSequencesOccurringMostOften(RuleApplicationData appData) {
Note: See TracChangeset
for help on using the changeset viewer.