|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.Interval
generator.data.IntervalNoUnion
public class IntervalNoUnion
Interval No Union
This is a an enhanced version of Interval for use with a intervalNoUnionList. New functions useful for the generator have also been created.Copyright(c) 2005 Université Laval, LSFM research group.
Field Summary |
---|
Fields inherited from class data.Interval |
---|
EMPTY_INTERVAL, R |
Constructor Summary | |
---|---|
IntervalNoUnion(boolean lowerBoundIsIncluded,
double lowerBound,
double upperBound,
boolean upperBoundIsIncluded)
Initialization constructor ... calls the constructor of Interval. |
Method Summary | |
---|---|
boolean |
canProduceInteger()
Checks if at least one integer is included in the interval |
IntervalListNoUnion |
divide(int numberOfParts)
Split an interval in a specified number of smaller intervals. |
double |
giveADouble()
Obtains a real number included in the interval |
int |
giveAnInteger()
Obtains an integer number included in the current interval. |
Methods inherited from class data.Interval |
---|
closure, equals, getLowerBound, getNb, getUpperBound, hashCode, intersectionOf, intersectsWith, isDiscrete, isIn, isIncluded, isLowerBoundIncluded, isUpperBoundIncluded, setIsLowerBoundIncluded, setIsUpperBoundIncluded, setLowerBound, setNb, setUpperBound, toString, unionOf, verifierInvariants |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntervalNoUnion(boolean lowerBoundIsIncluded, double lowerBound, double upperBound, boolean upperBoundIsIncluded)
lowerBoundIsIncluded
- true if the lower bound is includedlowerBound
- the lower bound valueupperBound
- the upper bound valueupperBoundIsIncluded
- true if the upper bound is includedMethod Detail |
---|
public boolean canProduceInteger()
public IntervalListNoUnion divide(int numberOfParts) throws PartitionException
numberOfParts
- the number of intervals to create
PartitionException
- if partition failspublic double giveADouble()
public int giveAnInteger() throws IntervalNoUnionException
IntervalNoUnionException
- if no integer can be produced
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |