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

Legend:

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

    r655 r766  
    11package de.ugoe.cs.quest.coverage; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.Collection; 
    54import java.util.LinkedHashSet; 
     
    6968     * @param length 
    7069     *            length of the subsequences for which the coverage is analyzed; must be >0 
    71      * @throws InvalidParameterException 
     70     * @throws IllegalArgumentException 
    7271     *             thrown if observedSequences or sequences is null or length less than or equal to 
    7372     *             0 
     
    7877    { 
    7978        if (observedSequences == null) { 
    80             throw new InvalidParameterException("observed sequences must not be null"); 
     79            throw new IllegalArgumentException("observed sequences must not be null"); 
    8180        } 
    8281        if (sequences == null) { 
    83             throw new InvalidParameterException("sequences must not be null"); 
     82            throw new IllegalArgumentException("sequences must not be null"); 
    8483        } 
    8584        if (length <= 0) { 
    86             throw new InvalidParameterException("length must be >0; actual value: " + length); 
     85            throw new IllegalArgumentException("length must be >0; actual value: " + length); 
    8786        } 
    8887        this.observedSequences = observedSequences; 
     
    158157     *            stochastic process which is used to determine which subsequences are possible 
    159158     * @return coverage percentage 
    160      * @throws InvalidParameterException 
     159     * @throws IllegalArgumentException 
    161160     *             thrown if process is null 
    162161     */ 
    163162    public double getCoveragePossibleNew(IStochasticProcess process) { 
    164163        if (process == null) { 
    165             throw new InvalidParameterException("process must not be null"); 
     164            throw new IllegalArgumentException("process must not be null"); 
    166165        } 
    167166        createSubSeqs(); 
     
    186185     *            are possible 
    187186     * @return coverage percentage 
    188      * @throws InvalidParameterException 
     187     * @throws IllegalArgumentException 
    189188     *             thrown if process is null 
    190189     */ 
    191190    public double getCoveragePossibleNewWeight(IStochasticProcess process) { 
    192191        if (process == null) { 
    193             throw new InvalidParameterException("process must not be null"); 
     192            throw new IllegalArgumentException("process must not be null"); 
    194193        } 
    195194        createSubSeqs(); 
  • trunk/quest-core-coverage/src/main/java/de/ugoe/cs/quest/coverage/CoverageCalculatorProcess.java

    r655 r766  
    11package de.ugoe.cs.quest.coverage; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.Collection; 
    54import java.util.List; 
     
    7473     * @param length 
    7574     *            length of the subsequences for which the coverage is analyzed; must be >0 
    76      * @throws InvalidParameterException 
     75     * @throws IllegalArgumentException 
    7776     *             thrown if process or sequences is null or length less than or equal to 0 
    7877     */ 
     
    8281    { 
    8382        if (process == null) { 
    84             throw new InvalidParameterException("process must not be null"); 
     83            throw new IllegalArgumentException("process must not be null"); 
    8584        } 
    8685        if (sequences == null) { 
    87             throw new InvalidParameterException("sequences must not be null"); 
     86            throw new IllegalArgumentException("sequences must not be null"); 
    8887        } 
    8988        if (length <= 0) { 
    90             throw new InvalidParameterException("length must be >0; actual value: " + length); 
     89            throw new IllegalArgumentException("length must be >0; actual value: " + length); 
    9190        } 
    9291        this.process = process; 
     
    191190     * @param newSequences 
    192191     *            new collection of sequences 
    193      * @throws InvalidParameterException 
     192     * @throws IllegalArgumentException 
    194193     *             thrown is newSequences is null 
    195194     */ 
    196195    public void setSequences(Collection<List<Event>> newSequences) { 
    197196        if (newSequences == null) { 
    198             throw new InvalidParameterException("sequences must not be null"); 
     197            throw new IllegalArgumentException("sequences must not be null"); 
    199198        } 
    200199        this.sequences = newSequences; 
  • trunk/quest-core-coverage/src/main/java/de/ugoe/cs/quest/coverage/SequenceTools.java

    r655 r766  
    11package de.ugoe.cs.quest.coverage; 
    22 
    3 import java.security.InvalidParameterException; 
    43import java.util.Collection; 
    54import java.util.LinkedHashMap; 
     
    8382     *            lenght of the sequences 
    8483     * @return numStates^length 
    85      * @throws InvalidParameterException 
     84     * @throws IllegalArgumentException 
    8685     *             thrown if length less or equal to 0 
    8786     */ 
    8887    public static long numSequences(IStochasticProcess process, int length) { 
    8988        if (length <= 0) { 
    90             throw new InvalidParameterException("length must be a positive integer"); 
     89            throw new IllegalArgumentException("length must be a positive integer"); 
    9190        } 
    9291        long result = 0; 
     
    108107     *            length of the subsequences 
    109108     * @return {@link Set} of all subsequences 
    110      * @throws InvalidParameterException 
     109     * @throws IllegalArgumentException 
    111110     *             thrown if length less or equal to 0 
    112111     */ 
     
    115114    { 
    116115        if (length <= 0) { 
    117             throw new InvalidParameterException("length must be a positive integer"); 
     116            throw new IllegalArgumentException("length must be a positive integer"); 
    118117        } 
    119118        Set<List<Event>> containedSubSeqs = new LinkedHashSet<List<Event>>(); 
Note: See TracChangeset for help on using the changeset viewer.