Ignore:
Timestamp:
09/04/12 17:15:28 (12 years ago)
Author:
sherbold
Message:
Location:
trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/DeterministicFiniteAutomaton.java

    r655 r766  
    11package de.ugoe.cs.quest.usageprofiles; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.Collection; 
    54import java.util.LinkedList; 
     
    5251    public double getProbability(List<Event> context, Event symbol) { 
    5352        if (context == null) { 
    54             throw new InvalidParameterException("context must not be null"); 
     53            throw new IllegalArgumentException("context must not be null"); 
    5554        } 
    5655        if (symbol == null) { 
    57             throw new InvalidParameterException("symbol must not be null"); 
     56            throw new IllegalArgumentException("symbol must not be null"); 
    5857        } 
    5958        double result = 0.0d; 
  • trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/HighOrderMarkovModel.java

    r655 r766  
    11package de.ugoe.cs.quest.usageprofiles; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.Collection; 
    54import java.util.LinkedList; 
     
    5251    public double getProbability(List<Event> context, Event symbol) { 
    5352        if (context == null) { 
    54             throw new InvalidParameterException("context must not be null"); 
     53            throw new IllegalArgumentException("context must not be null"); 
    5554        } 
    5655        if (symbol == null) { 
    57             throw new InvalidParameterException("symbol must not be null"); 
     56            throw new IllegalArgumentException("symbol must not be null"); 
    5857        } 
    5958        double result = 0.0d; 
  • trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/IStochasticProcess.java

    r655 r766  
    22 
    33import java.io.Serializable; 
    4 import java.security.InvalidParameterException; 
    54import java.util.Collection; 
    65import java.util.List; 
     
    3130     * @return probabilty the {@code symbol} is the next event, given the last events 
    3231     *         {@code context} 
    33      * @throws InvalidParameterException 
     32     * @throws IllegalArgumentException 
    3433     *             thrown if context or symbol is null 
    3534     */ 
     
    4443     *            sequences of which the probability is calculated 
    4544     * @return probability of the sequences; 1.0 if sequence is empty or null 
    46      * @throws InvalidParameterException 
     45     * @throws IllegalArgumentException 
    4746     *             thrown if sequence is null 
    4847     */ 
     
    9089     * @return generated sequences 
    9190     * @see #generateSequences(int, boolean) 
    92      * @throws InvalidParameterException 
     91     * @throws IllegalArgumentException 
    9392     *             thrown if length is less than or equal to 0 
    9493     */ 
     
    108107     *            if true, all generated sequences start with {@link Event#STARTEVENT} 
    109108     * @return generated sequences 
    110      * @throws InvalidParameterException 
     109     * @throws IllegalArgumentException 
    111110     *             thrown if length is less than or equal to 0 
    112111     */ 
     
    123122     * @param length 
    124123     * @return generated sequences 
    125      * @throws InvalidParameterException 
     124     * @throws IllegalArgumentException 
    126125     *             thrown if length is less than or equal to 0 
    127126     */ 
  • trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/IncompleteMemory.java

    r655 r766  
    11package de.ugoe.cs.quest.usageprofiles; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.LinkedList; 
    54import java.util.List; 
     
    4140     * @param length 
    4241     *            number of recent events that are remembered 
    43      * @throws InvalidParameterException 
     42     * @throws IllegalArgumentException 
    4443     *             This exception is thrown if the length is smaller than 1 
    4544     */ 
    4645    public IncompleteMemory(int length) { 
    4746        if (length < 1) { 
    48             throw new InvalidParameterException("Length of IncompleteMemory must be at least 1."); 
     47            throw new IllegalArgumentException("Length of IncompleteMemory must be at least 1."); 
    4948        } 
    5049        this.length = length; 
  • trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/PredictionByPartialMatch.java

    r655 r766  
    11package de.ugoe.cs.quest.usageprofiles; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.Collection; 
    54import java.util.LinkedList; 
     
    9089     * @param probEscape 
    9190     *            escape probability used by the model 
    92      * @throws InvalidParameterException 
     91     * @throws IllegalArgumentException 
    9392     *             thrown if minOrder is less than 0 or greater than markovOrder or probEscape is 
    9493     *             not in the interval (0,1) 
     
    9796        super(markovOrder, r); 
    9897        if (minOrder < 0) { 
    99             throw new InvalidParameterException("minOrder must be greather than or equal to 0"); 
     98            throw new IllegalArgumentException("minOrder must be greather than or equal to 0"); 
    10099        } 
    101100        if (minOrder > markovOrder) { 
    102             throw new InvalidParameterException( 
     101            throw new IllegalArgumentException( 
    103102                                                "minOrder must be less than or equal to markovOrder"); 
    104103        } 
    105104        if (probEscape <= 0.0 || probEscape >= 1.0) { 
    106             throw new InvalidParameterException("probEscape must be in the interval (0,1)"); 
     105            throw new IllegalArgumentException("probEscape must be in the interval (0,1)"); 
    107106        } 
    108107        this.probEscape = probEscape; 
     
    147146    public double getProbability(List<Event> context, Event symbol) { 
    148147        if (context == null) { 
    149             throw new InvalidParameterException("context must not be null"); 
     148            throw new IllegalArgumentException("context must not be null"); 
    150149        } 
    151150        if (symbol == null) { 
    152             throw new InvalidParameterException("symbol must not be null"); 
     151            throw new IllegalArgumentException("symbol must not be null"); 
    153152        } 
    154153        double result = 0.0d; 
  • trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/Trie.java

    r655 r766  
    22 
    33import java.io.Serializable; 
    4 import java.security.InvalidParameterException; 
    54import java.util.Collection; 
    65import java.util.HashSet; 
     
    7170    public Trie(Trie<T> other) { 
    7271        if (other == null) { 
    73             throw new InvalidParameterException("other trie must not be null"); 
     72            throw new IllegalArgumentException("other trie must not be null"); 
    7473        } 
    7574        rootNode = new TrieNode<T>(other.rootNode); 
  • trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/TrieBasedModel.java

    r655 r766  
    11package de.ugoe.cs.quest.usageprofiles; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.ArrayList; 
    54import java.util.Collection; 
     
    6665     * @param r 
    6766     *            random number generator used by probabilistic methods of the class 
    68      * @throws InvalidParameterException 
     67     * @throws IllegalArgumentException 
    6968     *             thrown if markovOrder is less than 0 or the random number generator r is null 
    7069     */ 
     
    7271        super(); 
    7372        if (markovOrder < 0) { 
    74             throw new InvalidParameterException("markov order must not be less than 0"); 
     73            throw new IllegalArgumentException("markov order must not be less than 0"); 
    7574        } 
    7675        if (r == null) { 
    77             throw new InvalidParameterException("random number generator r must not be null"); 
     76            throw new IllegalArgumentException("random number generator r must not be null"); 
    7877        } 
    7978        this.trieOrder = markovOrder + 1; 
     
    9089     * @param sequences 
    9190     *            training data 
    92      * @throws InvalidParameterException 
     91     * @throws IllegalArgumentException 
    9392     *             thrown is sequences is null 
    9493     */ 
     
    107106     * @param sequences 
    108107     *            training data 
    109      * @throws InvalidParameterException 
     108     * @throws IllegalArgumentException 
    110109     *             thrown is sequences is null 
    111110     */ 
    112111    public void update(Collection<List<Event>> sequences) { 
    113112        if (sequences == null) { 
    114             throw new InvalidParameterException("sequences must not be null"); 
     113            throw new IllegalArgumentException("sequences must not be null"); 
    115114        } 
    116115        if (trie == null) { 
     
    300299        Set<List<Event>> sequenceSet = new LinkedHashSet<List<Event>>(); 
    301300        if (length < 1) { 
    302             throw new InvalidParameterException( 
     301            throw new IllegalArgumentException( 
    303302                                                "Length of generated subsequences must be at least 1."); 
    304303        } 
     
    361360    public double getProbability(List<Event> sequence) { 
    362361        if (sequence == null) { 
    363             throw new InvalidParameterException("sequence must not be null"); 
     362            throw new IllegalArgumentException("sequence must not be null"); 
    364363        } 
    365364        double prob = 1.0; 
  • trunk/quest-core-usageprofiles/src/main/java/de/ugoe/cs/quest/usageprofiles/TrieNode.java

    r655 r766  
    22 
    33import java.io.Serializable; 
    4 import java.security.InvalidParameterException; 
    54import java.util.Collection; 
    65import java.util.LinkedList; 
     
    7877    TrieNode(T symbol) { 
    7978        if (symbol == null) { 
    80             throw new InvalidParameterException( 
     79            throw new IllegalArgumentException( 
    8180                                                "symbol must not be null. null is reserved for root node!"); 
    8281        } 
     
    9594    TrieNode(TrieNode<T> other) { 
    9695        if (other == null) { 
    97             throw new InvalidParameterException("other must not be null"); 
     96            throw new IllegalArgumentException("other must not be null"); 
    9897        } 
    9998        symbol = other.symbol; 
Note: See TracChangeset for help on using the changeset viewer.