Class Interval
java.lang.Object
org.apache.commons.math3.geometry.euclidean.oned.Interval
This class represents a 1D interval.
- Since:
- 3.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckPoint(double point, double tolerance) Check a point with respect to the interval.doubleGet the barycenter of the interval.doublegetInf()Get the lower bound of the interval.doubleDeprecated.doublegetLower()Deprecated.as of 3.1, replaced bygetInf()doubleDeprecated.as of 3.1, replaced bygetBarycenter()doublegetSize()Get the size of the interval.doublegetSup()Get the upper bound of the interval.doublegetUpper()Deprecated.as of 3.1, replaced bygetSup()
-
Constructor Details
-
Interval
public Interval(double lower, double upper) Simple constructor.- Parameters:
lower- lower bound of the intervalupper- upper bound of the interval
-
-
Method Details
-
getInf
public double getInf()Get the lower bound of the interval.- Returns:
- lower bound of the interval
- Since:
- 3.1
-
getLower
Deprecated.as of 3.1, replaced bygetInf()Get the lower bound of the interval.- Returns:
- lower bound of the interval
-
getSup
public double getSup()Get the upper bound of the interval.- Returns:
- upper bound of the interval
- Since:
- 3.1
-
getUpper
Deprecated.as of 3.1, replaced bygetSup()Get the upper bound of the interval.- Returns:
- upper bound of the interval
-
getSize
public double getSize()Get the size of the interval.- Returns:
- size of the interval
- Since:
- 3.1
-
getLength
Deprecated.as of 3.1, replaced bygetSize()Get the length of the interval.- Returns:
- length of the interval
-
getBarycenter
public double getBarycenter()Get the barycenter of the interval.- Returns:
- barycenter of the interval
- Since:
- 3.1
-
getMidPoint
Deprecated.as of 3.1, replaced bygetBarycenter()Get the midpoint of the interval.- Returns:
- midpoint of the interval
-
checkPoint
Check a point with respect to the interval.- Parameters:
point- point to checktolerance- tolerance below which points are considered to belong to the boundary- Returns:
- a code representing the point status: either
Region.Location.INSIDE,Region.Location.OUTSIDEorRegion.Location.BOUNDARY - Since:
- 3.1
-
getSize()