public class FloatingPointInterval<T extends Number & Comparable<T>> extends Object
Title: Floating Point Interval
Description: An immutable interval representation supporting the value space of floating point numbers.
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Modifier and Type | Class and Description |
|---|---|
class |
FloatingPointInterval.ValueIterator |
| Constructor and Description |
|---|
FloatingPointInterval(FloatingPointType<T> type,
T point)
Create a point interval.
|
FloatingPointInterval(FloatingPointType<T> type,
T lower,
T upper)
Create an interval.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canUnionWith(FloatingPointInterval<T> other) |
boolean |
contains(T n) |
boolean |
equals(Object obj) |
T |
getLower() |
T |
getUpper() |
FloatingPointInterval<T> |
greater(T n)
Get the subinterval greater than n
|
int |
hashCode() |
FloatingPointInterval<T> |
intersection(FloatingPointInterval<T> that) |
FloatingPointInterval<T> |
less(T n)
Get the subinterval less than n
|
List<FloatingPointInterval<T>> |
remove(FloatingPointInterval<T> other) |
Number |
size() |
static <U extends Number & Comparable<U>> |
unconstrained(FloatingPointType<U> type) |
List<FloatingPointInterval<T>> |
union(FloatingPointInterval<T> other) |
Iterator<T> |
valueIterator() |
public FloatingPointInterval(FloatingPointType<T> type, T point)
#IEEEFloatInterval(Float, Float) with arguments
point,point,true,truepoint - Value of point intervalpublic FloatingPointInterval(FloatingPointType<T> type, T lower, T upper)
lower - Interval lower boundupper - Interval upper boundpublic static <U extends Number & Comparable<U>> FloatingPointInterval<U> unconstrained(FloatingPointType<U> type)
public boolean canUnionWith(FloatingPointInterval<T> other)
public boolean contains(T n)
public T getLower()
public T getUpper()
public FloatingPointInterval<T> greater(T n)
n - null if that intersection is emptypublic FloatingPointInterval<T> intersection(FloatingPointInterval<T> that)
public FloatingPointInterval<T> less(T n)
n - null if that intersection is emptypublic List<FloatingPointInterval<T>> remove(FloatingPointInterval<T> other)
public Number size()
public List<FloatingPointInterval<T>> union(FloatingPointInterval<T> other)
Copyright © 2019. All rights reserved.