com.clarkparsia.pellet.datatypes.types.floating
Class FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>>

java.lang.Object
  extended by com.clarkparsia.pellet.datatypes.DiscreteInterval<T,FloatingPointInterval<T>>
      extended by com.clarkparsia.pellet.datatypes.types.floating.FloatingPointInterval<T>

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 com.clarkparsia.pellet.datatypes.DiscreteInterval
DiscreteInterval.ValueIterator
 
Constructor Summary
FloatingPointInterval(FloatingPointType<T> type, T point)
           
FloatingPointInterval(FloatingPointType<T> type, T lower, T upper)
           
 
Method Summary
 boolean contains(T n)
           
 boolean equals(java.lang.Object obj)
           
 FloatingPointInterval<T> greater(T n)
          Get the subinterval greater than n
 FloatingPointInterval<T> less(T n)
          Get the subinterval less than n
 java.lang.Number size()
           
static
<U extends java.lang.Number & java.lang.Comparable<U>>
FloatingPointInterval<U>
unconstrained(FloatingPointType<U> type)
           
 
Methods inherited from class com.clarkparsia.pellet.datatypes.DiscreteInterval
canUnionWith, getLower, getUpper, hashCode, intersection, isFinite, remove, toString, union, valueIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 class DiscreteInterval<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 class DiscreteInterval<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 class DiscreteInterval<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 class DiscreteInterval<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 class DiscreteInterval<T extends java.lang.Number & java.lang.Comparable<T>,FloatingPointInterval<T extends java.lang.Number & java.lang.Comparable<T>>>


Copyright © 2004 Evren Sirin. All Rights Reserved.