Ignore:
Timestamp:
09/04/12 17:15:28 (12 years ago)
Author:
sherbold
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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; 
Note: See TracChangeset for help on using the changeset viewer.