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

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

public class Interval
extends Object

This class represents a 1D interval.

Since:
3.0
Version:
$Id: Interval.java 1244107 2012-02-14 16:17:55Z erans $
See Also:
IntervalsSet

Field Summary
private  double lower
          The lower bound of the interval.
private  double upper
          The upper bound of the interval.
 
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
 

Field Detail

lower

private final double lower
The lower bound of the interval.


upper

private final double upper
The upper bound of the interval.

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 (c) 2003-2013 Apache Software Foundation