|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--jumbo.euclid.Status
|
+--jumbo.euclid.RealRange
RealRange - maximum and minimum values
Contains two doubles representing the minimum and maximum of an allowed or observed range.
Default is range with low > high; this can be regarded as the uninitialised state. If points are added to a default RealRange it becomes initialised.
| Field Summary | |
protected double |
maxval
maximum of range |
protected double |
minval
minimum of range |
| Constructor Summary | |
RealRange()
creates invalid range from POSITIVE_INFINITY to NEGATIVE_INFINITY |
|
RealRange(double minv,
double maxv)
initialise with min and max values; if minv > maxv create inValid RealRange |
|
RealRange(IntRange ir)
from an IntRange |
|
RealRange(RealRange r)
copy constructor |
|
| Method Summary | |
void |
add(double x)
add a value to a range |
boolean |
contains(double f)
synonym for includes() |
boolean |
equals(RealRange r)
invalid ranges return false |
double |
getMax()
get maximum value (NEGATIVE_INFINITY if inValid) |
double |
getMin()
get minimum value (POSITIVE_INFINITY if inValid) |
double |
getRange()
get range (NaN if invalid) |
boolean |
includes(double f)
is a double within a RealRange? If inValid, return false |
boolean |
includes(RealRange r2)
does one range include another? |
RealRange |
intersectionWith(RealRange r2)
intersect two ranges and take the range common to both; return invalid range if no overlap |
boolean |
isValid()
a Range is only valid if its maxval is not less than its minval; this tests for uninitialised ranges |
static void |
main(java.lang.String[] args)
tests RealRange routines |
RealRange |
plus(RealRange r2)
combine two ranges if both valid; takes greatest limits of both, else returns InValid |
java.lang.String |
toString()
output |
| Methods inherited from class jumbo.euclid.Status |
NYI |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected double maxval
protected double minval
| Constructor Detail |
public RealRange()
public RealRange(double minv,
double maxv)
public RealRange(RealRange r)
public RealRange(IntRange ir)
| Method Detail |
public boolean isValid()
public boolean equals(RealRange r)
public RealRange plus(RealRange r2)
public RealRange intersectionWith(RealRange r2)
public double getMin()
public double getMax()
public double getRange()
public boolean includes(RealRange r2)
public boolean includes(double f)
public boolean contains(double f)
public void add(double x)
public java.lang.String toString()
public static void main(java.lang.String[] args)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||