Class FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>>
- java.lang.Object
-
- openllet.core.datatypes.DiscreteInterval<T,FloatingPointInterval<T>>
-
- openllet.core.datatypes.types.floating.FloatingPointInterval<T>
-
- Type Parameters:
T
- specific type of number
public class FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>> extends DiscreteInterval<T,FloatingPointInterval<T>>
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.
- Author:
- Mike Smith
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class openllet.core.datatypes.DiscreteInterval
DiscreteInterval.ValueIterator
-
-
Constructor Summary
Constructors Constructor Description FloatingPointInterval(FloatingPointType<T> type, T point)
FloatingPointInterval(FloatingPointType<T> type, T lower, T upper)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(T n)
boolean
equals(java.lang.Object obj)
FloatingPointInterval<T>
greater(T n)
Get the subinterval greater than nFloatingPointInterval<T>
less(T n)
Get the subinterval less than njava.lang.Number
size()
static <U extends java.lang.Number & java.lang.Comparable<U>>
FloatingPointInterval<U>unconstrained(FloatingPointType<U> type)
-
Methods inherited from class openllet.core.datatypes.DiscreteInterval
canUnionWith, getLower, getUpper, hashCode, intersection, isFinite, remove, toString, union, valueIterator
-
-
-
-
Constructor Detail
-
FloatingPointInterval
public FloatingPointInterval(FloatingPointType<T> type, T point)
-
FloatingPointInterval
public FloatingPointInterval(FloatingPointType<T> type, T lower, T upper)
-
-
Method Detail
-
unconstrained
public static <U extends java.lang.Number & java.lang.Comparable<U>> FloatingPointInterval<U> unconstrained(FloatingPointType<U> type)
-
contains
public boolean contains(T n)
- Overrides:
contains
in classDiscreteInterval<T extends java.lang.Number & java.lang.Comparable<T>,FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>>>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in classDiscreteInterval<T extends java.lang.Number & java.lang.Comparable<T>,FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>>>
-
greater
public FloatingPointInterval<T> greater(T n)
Description copied from class:DiscreteInterval
Get the subinterval greater than n- Overrides:
greater
in classDiscreteInterval<T extends java.lang.Number & java.lang.Comparable<T>,FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>>>
- Returns:
- a new interval, formed by intersecting this interval with (n,+inf) or
null
if that intersection is empty
-
less
public FloatingPointInterval<T> less(T n)
Description copied from class:DiscreteInterval
Get the subinterval less than n- Overrides:
less
in classDiscreteInterval<T extends java.lang.Number & java.lang.Comparable<T>,FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>>>
- Returns:
- a new interval, formed by intersecting this interval with (-inf,n) or
null
if that intersection is empty
-
size
public java.lang.Number size()
- Specified by:
size
in classDiscreteInterval<T extends java.lang.Number & java.lang.Comparable<T>,FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>>>
-
-