
public class Interval extends Object implements Comparable<Interval>
| Modifier and Type | Field and Description |
|---|---|
private int |
dimension
The dimension of this interval in the (original) data space.
|
private double |
max
The maximum (right) value of this interval.
|
private double |
min
The minimum (left) value of this interval.
|
| Constructor and Description |
|---|
Interval(int dimension,
double min,
double max)
Creates a new interval with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Interval other)
Compares this interval with the specified interval for order.
|
int |
getDimension()
Returns the dimension of the interval in the original data space
|
double |
getMax()
Returns the maximum (right) value of the interval.
|
double |
getMin()
Returns the minimum (left) value of the interval.
|
String |
toString()
Returns a string representation of this interval.
|
private int dimension
private double min
private double max
public Interval(int dimension,
double min,
double max)
dimension - the dimension of the interval in the original data spacemin - the minimum (left) value of the intervalmax - the maximum (right) value of the intervalpublic int getDimension()
public double getMin()
public double getMax()
public String toString()
public int compareTo(Interval other)
compareTo in interface Comparable<Interval>other - the interval to be compared