net.sourceforge.interval.ia_math
Class RealInterval

java.lang.Object
  |
  +--net.sourceforge.interval.ia_math.RealInterval
All Implemented Interfaces:
java.lang.Cloneable

public class RealInterval
extends java.lang.Object
implements java.lang.Cloneable

RealInterval.java

-- classes implementing real intervals as part of the "ia_math library" version 0.1beta1, 10/97

Copyright (C) 2000 Timothy J. Hickey

License: zlib/png

the class RealInterval represents closed intervals of real numbers


Constructor Summary
RealInterval()
          construct the interval [-infty,infty]
RealInterval(double x)
           
RealInterval(double lo, double hi)
           
 
Method Summary
 java.lang.Object clone()
           
static RealInterval emptyInterval()
           
 boolean equals(RealInterval x)
           
static RealInterval fullInterval()
           
 double hi()
           
 void intersect(RealInterval x)
           
 double lo()
           
static void main(java.lang.String[] args)
          a test procedure which generates a few intervals and adds and multiplies them
 boolean nonEmpty()
           
 java.lang.String toString()
           
 void union(RealInterval x)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RealInterval

public RealInterval(double lo,
                    double hi)
             throws IAException

RealInterval

public RealInterval(double x)
             throws IAException

RealInterval

public RealInterval()
construct the interval [-infty,infty]
Method Detail

lo

public double lo()

hi

public double hi()

equals

public boolean equals(RealInterval x)

intersect

public void intersect(RealInterval x)
               throws IAException

union

public void union(RealInterval x)
           throws IAException

nonEmpty

public boolean nonEmpty()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

emptyInterval

public static RealInterval emptyInterval()

fullInterval

public static RealInterval fullInterval()

main

public static void main(java.lang.String[] args)
a test procedure which generates a few intervals and adds and multiplies them