Changeset 766 for trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/TrieBasedModel.java
- Timestamp:
- 09/04/12 17:15:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/TrieBasedModel.java
r655 r766 1 1 package de.ugoe.cs.quest.usageprofiles; 2 2 3 import java.security.InvalidParameterException;4 3 import java.util.ArrayList; 5 4 import java.util.Collection; … … 66 65 * @param r 67 66 * random number generator used by probabilistic methods of the class 68 * @throws I nvalidParameterException67 * @throws IllegalArgumentException 69 68 * thrown if markovOrder is less than 0 or the random number generator r is null 70 69 */ … … 72 71 super(); 73 72 if (markovOrder < 0) { 74 throw new I nvalidParameterException("markov order must not be less than 0");73 throw new IllegalArgumentException("markov order must not be less than 0"); 75 74 } 76 75 if (r == null) { 77 throw new I nvalidParameterException("random number generator r must not be null");76 throw new IllegalArgumentException("random number generator r must not be null"); 78 77 } 79 78 this.trieOrder = markovOrder + 1; … … 90 89 * @param sequences 91 90 * training data 92 * @throws I nvalidParameterException91 * @throws IllegalArgumentException 93 92 * thrown is sequences is null 94 93 */ … … 107 106 * @param sequences 108 107 * training data 109 * @throws I nvalidParameterException108 * @throws IllegalArgumentException 110 109 * thrown is sequences is null 111 110 */ 112 111 public void update(Collection<List<Event>> sequences) { 113 112 if (sequences == null) { 114 throw new I nvalidParameterException("sequences must not be null");113 throw new IllegalArgumentException("sequences must not be null"); 115 114 } 116 115 if (trie == null) { … … 300 299 Set<List<Event>> sequenceSet = new LinkedHashSet<List<Event>>(); 301 300 if (length < 1) { 302 throw new I nvalidParameterException(301 throw new IllegalArgumentException( 303 302 "Length of generated subsequences must be at least 1."); 304 303 } … … 361 360 public double getProbability(List<Event> sequence) { 362 361 if (sequence == null) { 363 throw new I nvalidParameterException("sequence must not be null");362 throw new IllegalArgumentException("sequence must not be null"); 364 363 } 365 364 double prob = 1.0;
Note: See TracChangeset
for help on using the changeset viewer.