Changeset 766 for trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/PredictionByPartialMatch.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/PredictionByPartialMatch.java
r655 r766 1 1 package de.ugoe.cs.quest.usageprofiles; 2 2 3 import java.security.InvalidParameterException;4 3 import java.util.Collection; 5 4 import java.util.LinkedList; … … 90 89 * @param probEscape 91 90 * escape probability used by the model 92 * @throws I nvalidParameterException91 * @throws IllegalArgumentException 93 92 * thrown if minOrder is less than 0 or greater than markovOrder or probEscape is 94 93 * not in the interval (0,1) … … 97 96 super(markovOrder, r); 98 97 if (minOrder < 0) { 99 throw new I nvalidParameterException("minOrder must be greather than or equal to 0");98 throw new IllegalArgumentException("minOrder must be greather than or equal to 0"); 100 99 } 101 100 if (minOrder > markovOrder) { 102 throw new I nvalidParameterException(101 throw new IllegalArgumentException( 103 102 "minOrder must be less than or equal to markovOrder"); 104 103 } 105 104 if (probEscape <= 0.0 || probEscape >= 1.0) { 106 throw new I nvalidParameterException("probEscape must be in the interval (0,1)");105 throw new IllegalArgumentException("probEscape must be in the interval (0,1)"); 107 106 } 108 107 this.probEscape = probEscape; … … 147 146 public double getProbability(List<Event> context, Event symbol) { 148 147 if (context == null) { 149 throw new I nvalidParameterException("context must not be null");148 throw new IllegalArgumentException("context must not be null"); 150 149 } 151 150 if (symbol == null) { 152 throw new I nvalidParameterException("symbol must not be null");151 throw new IllegalArgumentException("symbol must not be null"); 153 152 } 154 153 double result = 0.0d;
Note: See TracChangeset
for help on using the changeset viewer.