org.apache.commons.math.geometry.euclidean.oned
Class Interval

java.lang.Object
  extended by org.apache.commons.math.geometry.euclidean.oned.Interval

public class Interval
extends java.lang.Object

This class represents a 1D interval.

Since:
3.0
Version:
$Id: Interval.java 1131229 2011-06-03 20:49:25Z luc $
See Also:
IntervalsSet

Constructor Summary
Interval(double lower, double upper)
          Simple constructor.
 
Method Summary
 double getLength()
          Get the length of the interval.
 double getLower()
          Get the lower bound of the interval.
 double getMidPoint()
          Get the midpoint of the interval.
 double getUpper()
          Get the upper bound of the interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interval

public Interval(double lower,
                double upper)
Simple constructor.

Parameters:
lower - lower bound of the interval
upper - upper bound of the interval
Method Detail

getLower

public double getLower()
Get the lower bound of the interval.

Returns:
lower bound of the interval

getUpper

public double getUpper()
Get the upper bound of the interval.

Returns:
upper bound of the interval

getLength

public double getLength()
Get the length of the interval.

Returns:
length of the interval

getMidPoint

public double getMidPoint()
Get the midpoint of the interval.

Returns:
midpoint of the interval


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.