public class Interval
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
double |
lowerbound
Interval lower bound.
|
double |
upperbound
Interval upper bound.
|
Constructor and Description |
---|
Interval(double low,
double up,
int _attribute)
Parametrized constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addToCoveredInstances(int index)
Adds the index of the instance to the list of covered instances.
|
boolean |
covers(Instance inst)
Checks if the provided instance is covered by this interval in the specified attribute
|
boolean |
covers(int index)
Checks if the provided instance is covered by this interval in the specified attribute
|
java.util.ArrayList<java.lang.Integer> |
getCoveredInstances()
Provides the indexes of the instances in the data set covered by this interval
|
void |
mergeIntervals(Interval _int)
Merges the interval with the provided one
|
int |
support()
Provides the number of instances covered by this interval
|
java.lang.String |
toString()
Returns the object in form of string
|
public double lowerbound
public double upperbound
public Interval(double low, double up, int _attribute)
low
- lower bound of the intervalup
- upper bound of the interval_attribute
- the attribute in which this interval is locatedpublic boolean covers(Instance inst)
inst
- public boolean covers(int index)
index
- public void addToCoveredInstances(int index)
index
- the index of the instance to be storedpublic void mergeIntervals(Interval _int)
_int
- the interval to be merged withpublic int support()
public java.util.ArrayList<java.lang.Integer> getCoveredInstances()
public java.lang.String toString()
toString
in class java.lang.Object