Changeset 1734 for branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java
- Timestamp:
- 09/05/14 20:20:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java
r1733 r1734 43 43 import de.ugoe.cs.util.console.Console; 44 44 45 // TODO: Auto-generated Javadoc 45 46 /** 46 47 * <p> … … 66 67 67 68 /** 69 * The Class MaxCountAndLongestTasksFinder. 70 * 68 71 * @author Patrick Harms 69 72 */ … … 71 74 TrieProcessor<ITaskInstance> { 72 75 73 /** 74 * 75 */ 76 /** The current count. */ 76 77 private int currentCount; 77 78 78 /** 79 * 80 */ 79 /** The found tasks. */ 81 80 private final List<List<ITaskInstance>> foundTasks = new LinkedList<List<ITaskInstance>>(); 82 81 83 82 /** 84 * 83 * Instantiates a new max count and longest tasks finder. 85 84 */ 86 85 public MaxCountAndLongestTasksFinder() { … … 90 89 91 90 /** 92 * @return 91 * Gets the found tasks. 92 * 93 * @return the found tasks 93 94 */ 94 95 public Tasks getFoundTasks() { … … 158 159 159 160 /** 160 * 161 * Removes the permutations of shorter tasks. 161 162 */ 162 163 private void removePermutationsOfShorterTasks() { … … 189 190 190 191 /** 191 * 192 * The Class RuleApplicationData. 192 193 */ 193 194 private static class RuleApplicationData { 194 195 195 /** 196 * 197 */ 196 /** The sessions. */ 198 197 private final List<IUserSession> sessions; 199 198 200 /** 201 * 202 */ 199 /** The last trie. */ 203 200 private TaskInstanceTrie lastTrie; 204 201 205 /** 206 * default and minimum trained sequence length is 3 207 */ 202 /** default and minimum trained sequence length is 3. */ 208 203 private int trainedSequenceLength = 3; 209 204 210 /** 211 * 212 */ 205 /** The last found tasks. */ 213 206 private Tasks lastFoundTasks = new Tasks(Integer.MAX_VALUE, null); 214 207 215 /** 216 * 217 */ 208 /** The detected and replaced tasks. */ 218 209 private boolean detectedAndReplacedTasks; 219 210 220 /** 221 * 222 */ 211 /** The result. */ 223 212 private final RuleApplicationResult result = new RuleApplicationResult(); 224 213 225 /** 226 * 227 */ 214 /** The stop watch. */ 228 215 private final StopWatch stopWatch = new StopWatch(); 229 216 230 217 /** 231 * 218 * Instantiates a new rule application data. 219 * 220 * @param sessions the sessions 232 221 */ 233 222 private RuleApplicationData(List<IUserSession> sessions) { … … 236 225 237 226 /** 238 * 227 * Detected and replaced tasks. 228 * 229 * @return true, if successful 239 230 */ 240 231 private boolean detectedAndReplacedTasks() { … … 243 234 244 235 /** 245 * 236 * Detected and replaced tasks. 237 * 238 * @param detectedAndReplacedTasks the detected and replaced tasks 246 239 */ 247 240 private void detectedAndReplacedTasks(boolean detectedAndReplacedTasks) { … … 250 243 251 244 /** 245 * Gets the last found tasks. 246 * 252 247 * @return the lastFoundSequences 253 248 */ … … 257 252 258 253 /** 254 * Gets the last trie. 255 * 259 256 * @return the lastTrie 260 257 */ … … 264 261 265 262 /** 263 * Gets the result. 264 * 266 265 * @return the result 267 266 */ … … 271 270 272 271 /** 272 * Gets the sessions. 273 * 273 274 * @return the tree 274 275 */ … … 278 279 279 280 /** 281 * Gets the stop watch. 282 * 280 283 * @return the stopWatch 281 284 */ … … 285 288 286 289 /** 290 * Gets the trained sequence length. 291 * 287 292 * @return the trainedSequenceLength 288 293 */ … … 292 297 293 298 /** 294 * @param lastFoundSequences 295 * the lastFoundSequences to set 299 * Sets the last found tasks. 300 * 301 * @param lastFoundSequences the lastFoundSequences to set 296 302 */ 297 303 private void setLastFoundTasks(Tasks lastFoundSequences) { … … 300 306 301 307 /** 302 * @param lastTrie 303 * the lastTrie to set 308 * Sets the last trie. 309 * 310 * @param lastTrie the lastTrie to set 304 311 */ 305 312 private void setLastTrie(TaskInstanceTrie lastTrie) { … … 308 315 309 316 /** 310 * @param trainedSequenceLength 311 * the trainedSequenceLength to set 317 * Sets the trained sequence length. 318 * 319 * @param trainedSequenceLength the trainedSequenceLength to set 312 320 */ 313 321 private void setTrainedSequenceLength(int trainedSequenceLength) { … … 318 326 319 327 /** 328 * The Class Tasks. 329 * 320 330 * @author Patrick Harms 321 331 */ 322 332 private static class Tasks implements Iterable<List<ITaskInstance>> { 323 333 324 /** 325 * 326 */ 334 /** The occurrence count. */ 327 335 private final int occurrenceCount; 328 336 329 /** 330 * 331 */ 337 /** The sequences. */ 332 338 private final List<List<ITaskInstance>> sequences; 333 339 334 340 /** 335 * @param occurrenceCount 336 * @param sequences 341 * Instantiates a new tasks. 342 * 343 * @param occurrenceCount the occurrence count 344 * @param sequences the sequences 337 345 */ 338 346 private Tasks(int occurrenceCount, List<List<ITaskInstance>> sequences) { … … 343 351 344 352 /** 345 * @return 353 * Gets the occurrence count. 354 * 355 * @return the occurrence count 346 356 */ 347 357 private int getOccurrenceCount() { … … 364 374 365 375 /** 366 * @return 376 * Size. 377 * 378 * @return the int 367 379 */ 368 380 private int size() { … … 391 403 } 392 404 393 /** 394 * <p> 395 * the task factory to be used for creating substructures for the temporal 396 * relationships identified during rul application 397 * </p> 398 */ 405 /** <p> the task factory to be used for creating substructures for the temporal relationships identified during rul application </p>. */ 399 406 private final ITaskFactory taskFactory;; 400 407 401 /** 402 * <p> 403 * the task builder to be used for creating substructures for the temporal 404 * relationships identified during rule application 405 * </p> 406 */ 408 /** <p> the task builder to be used for creating substructures for the temporal relationships identified during rule application </p>. */ 407 409 private final ITaskBuilder taskBuilder; 408 410 … … 498 500 499 501 /** 500 * @param appData 501 * the rule application data combining all data used for applying 502 * Creates the new trie. 503 * 504 * @param appData the rule application data combining all data used for applying 502 505 * this rule 503 506 */ … … 554 557 555 558 /** 556 * TODO go on commenting 557 * 558 * @param appData 559 * the rule application data combining all data used for applying 559 * TODO go on commenting. 560 * 561 * @param appData the rule application data combining all data used for applying 560 562 * this rule 561 563 */ … … 578 580 579 581 /** 580 * @param appData 581 * the rule application data combining all data used for applying 582 * Gets the sequences occuring most often. 583 * 584 * @param appData the rule application data combining all data used for applying 582 585 * this rule 586 * @return the sequences occuring most often 583 587 */ 584 588 private void getSequencesOccuringMostOften(RuleApplicationData appData) { … … 668 672 669 673 /** 670 * @param trie 671 * @param object 672 * @return 674 * Gets the sub list index. 675 * 676 * @param list the list 677 * @param subList the sub list 678 * @param startIndex the start index 679 * @return the sub list index 673 680 */ 674 681 private int getSubListIndex(ITaskInstanceList list, … … 702 709 703 710 /** 704 * @param trie 705 * @param object 706 * @return 711 * Gets the sub list index. 712 * 713 * @param list the list 714 * @param subList the sub list 715 * @param startIndex the start index 716 * @return the sub list index 707 717 */ 708 718 private int getSubListIndex(List<ITaskInstance> list, … … 790 800 * <p> 791 801 * TODO clarify why this is done 792 * </p> 802 * </p>. 803 * 804 * @param iteration the iteration 805 * @param iterationInstances the iteration instances 793 806 */ 794 807 private void harmonizeIterationInstancesModel(IIteration iteration, … … 851 864 852 865 /** 853 * 866 * Harmonize sequence instances model. 867 * 868 * @param sequence the sequence 869 * @param sequenceInstances the sequence instances 870 * @param sequenceLength the sequence length 854 871 */ 855 872 private void harmonizeSequenceInstancesModel(ISequence sequence, … … 924 941 * <p> 925 942 * replaces all occurrences of all tasks provided in the set with iterations 926 * </p> 927 * 928 * @param iteratedTasks 929 * the tasks to be replaced with iterations 930 * @param sessions 931 * the sessions in which the tasks are to be replaced 932 * @param appData 933 * the rule application data combining all data used for applying 943 * </p>. 944 * 945 * @param iteratedTasks the tasks to be replaced with iterations 946 * @param sessions the sessions in which the tasks are to be replaced 947 * @param appData the rule application data combining all data used for applying 934 948 * this rule 935 949 */ … … 990 1004 991 1005 /** 992 * @param appData 993 * the rule application data combining all data used for applying 1006 * Replace sequences occurring most often. 1007 * 1008 * @param appData the rule application data combining all data used for applying 994 1009 * this rule 995 1010 */ … … 1032 1047 1033 1048 /** 1034 * @param tree 1049 * Replace task occurrences. 1050 * 1051 * @param task the task 1052 * @param sessions the sessions 1053 * @param temporalTaskModel the temporal task model 1054 * @return the list 1035 1055 */ 1036 1056 private List<ISequenceInstance> replaceTaskOccurrences( … … 1116 1136 * iterated, it is added to the returned set. 1117 1137 * </p> 1118 * 1119 * @param the 1120 * session to search for iterations in 1121 * 1138 * 1139 * @param sessions the sessions 1122 1140 * @return a set of tasks being iterated somewhere 1123 1141 */
Note: See TracChangeset
for help on using the changeset viewer.