Changeset 766 for trunk/quest-core-coverage/src
- Timestamp:
- 09/04/12 17:15:28 (12 years ago)
- 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 1 1 package de.ugoe.cs.quest.coverage; 2 2 3 import java.security.InvalidParameterException;4 3 import java.util.Collection; 5 4 import java.util.LinkedHashSet; … … 69 68 * @param length 70 69 * length of the subsequences for which the coverage is analyzed; must be >0 71 * @throws I nvalidParameterException70 * @throws IllegalArgumentException 72 71 * thrown if observedSequences or sequences is null or length less than or equal to 73 72 * 0 … … 78 77 { 79 78 if (observedSequences == null) { 80 throw new I nvalidParameterException("observed sequences must not be null");79 throw new IllegalArgumentException("observed sequences must not be null"); 81 80 } 82 81 if (sequences == null) { 83 throw new I nvalidParameterException("sequences must not be null");82 throw new IllegalArgumentException("sequences must not be null"); 84 83 } 85 84 if (length <= 0) { 86 throw new I nvalidParameterException("length must be >0; actual value: " + length);85 throw new IllegalArgumentException("length must be >0; actual value: " + length); 87 86 } 88 87 this.observedSequences = observedSequences; … … 158 157 * stochastic process which is used to determine which subsequences are possible 159 158 * @return coverage percentage 160 * @throws I nvalidParameterException159 * @throws IllegalArgumentException 161 160 * thrown if process is null 162 161 */ 163 162 public double getCoveragePossibleNew(IStochasticProcess process) { 164 163 if (process == null) { 165 throw new I nvalidParameterException("process must not be null");164 throw new IllegalArgumentException("process must not be null"); 166 165 } 167 166 createSubSeqs(); … … 186 185 * are possible 187 186 * @return coverage percentage 188 * @throws I nvalidParameterException187 * @throws IllegalArgumentException 189 188 * thrown if process is null 190 189 */ 191 190 public double getCoveragePossibleNewWeight(IStochasticProcess process) { 192 191 if (process == null) { 193 throw new I nvalidParameterException("process must not be null");192 throw new IllegalArgumentException("process must not be null"); 194 193 } 195 194 createSubSeqs(); -
trunk/quest-core-coverage/src/main/java/de/ugoe/cs/quest/coverage/CoverageCalculatorProcess.java
r655 r766 1 1 package de.ugoe.cs.quest.coverage; 2 2 3 import java.security.InvalidParameterException;4 3 import java.util.Collection; 5 4 import java.util.List; … … 74 73 * @param length 75 74 * length of the subsequences for which the coverage is analyzed; must be >0 76 * @throws I nvalidParameterException75 * @throws IllegalArgumentException 77 76 * thrown if process or sequences is null or length less than or equal to 0 78 77 */ … … 82 81 { 83 82 if (process == null) { 84 throw new I nvalidParameterException("process must not be null");83 throw new IllegalArgumentException("process must not be null"); 85 84 } 86 85 if (sequences == null) { 87 throw new I nvalidParameterException("sequences must not be null");86 throw new IllegalArgumentException("sequences must not be null"); 88 87 } 89 88 if (length <= 0) { 90 throw new I nvalidParameterException("length must be >0; actual value: " + length);89 throw new IllegalArgumentException("length must be >0; actual value: " + length); 91 90 } 92 91 this.process = process; … … 191 190 * @param newSequences 192 191 * new collection of sequences 193 * @throws I nvalidParameterException192 * @throws IllegalArgumentException 194 193 * thrown is newSequences is null 195 194 */ 196 195 public void setSequences(Collection<List<Event>> newSequences) { 197 196 if (newSequences == null) { 198 throw new I nvalidParameterException("sequences must not be null");197 throw new IllegalArgumentException("sequences must not be null"); 199 198 } 200 199 this.sequences = newSequences; -
trunk/quest-core-coverage/src/main/java/de/ugoe/cs/quest/coverage/SequenceTools.java
r655 r766 1 1 package de.ugoe.cs.quest.coverage; 2 2 3 import java.security.InvalidParameterException;4 3 import java.util.Collection; 5 4 import java.util.LinkedHashMap; … … 83 82 * lenght of the sequences 84 83 * @return numStates^length 85 * @throws I nvalidParameterException84 * @throws IllegalArgumentException 86 85 * thrown if length less or equal to 0 87 86 */ 88 87 public static long numSequences(IStochasticProcess process, int length) { 89 88 if (length <= 0) { 90 throw new I nvalidParameterException("length must be a positive integer");89 throw new IllegalArgumentException("length must be a positive integer"); 91 90 } 92 91 long result = 0; … … 108 107 * length of the subsequences 109 108 * @return {@link Set} of all subsequences 110 * @throws I nvalidParameterException109 * @throws IllegalArgumentException 111 110 * thrown if length less or equal to 0 112 111 */ … … 115 114 { 116 115 if (length <= 0) { 117 throw new I nvalidParameterException("length must be a positive integer");116 throw new IllegalArgumentException("length must be a positive integer"); 118 117 } 119 118 Set<List<Event>> containedSubSeqs = new LinkedHashSet<List<Event>>();
Note: See TracChangeset
for help on using the changeset viewer.