gov.sns.tools.math
Class OpenInterval

java.lang.Object
  |
  +--gov.sns.tools.math.Interval
        |
        +--gov.sns.tools.math.OpenInterval
All Implemented Interfaces:
java.io.Serializable

public class OpenInterval
extends Interval

Represents an open interval of the real line.

See Also:
Serialized Form

Constructor Summary
OpenInterval()
          Default constructor - creates the empty interval.
OpenInterval(double min, double max)
          Initializing constructor - create a new open interval with specified endpoints.
OpenInterval(Interval I)
          Copy constructor - create a new open interval initialized to the argument.
 
Method Summary
 boolean equals(OpenInterval I)
          Are intervals equal
 boolean intersect(Interval I)
          Is there a nonzero intersection between this interval and the argument.
 boolean membership(double x)
          Is point a member of the open interval
 java.lang.String toString()
          Return the contents of the interval as a String.
 
Methods inherited from class gov.sns.tools.math.Interval
boundary, computeHull, equals, getMax, getMin, measure, midpoint, print, println, setMax, setMin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpenInterval

public OpenInterval()
Default constructor - creates the empty interval.


OpenInterval

public OpenInterval(double min,
                    double max)
Initializing constructor - create a new open interval with specified endpoints.

Parameters:
min - left endpoint
max - right endpoint

OpenInterval

public OpenInterval(Interval I)
Copy constructor - create a new open interval initialized to the argument.

Parameters:
I - interval to copy
Method Detail

membership

public boolean membership(double x)
Is point a member of the open interval

Parameters:
x - point to test for membership
Returns:
true if x is in interval

intersect

public boolean intersect(Interval I)
Is there a nonzero intersection between this interval and the argument.

Parameters:
I - interval to be tested
Returns:
true if the intervals intersect

equals

public boolean equals(OpenInterval I)
Are intervals equal

Parameters:
I - interval object to be checked for equality
Returns:
true if both objects are equal as intervals

toString

public java.lang.String toString()
Return the contents of the interval as a String. return string representation of interval

Overrides:
toString in class Interval
See Also:
Object.toString()