public class Interval
extends java.lang.Object
Constructor and Description |
---|
Interval(int small,
int tamanio)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(double dato)
Adds a new value to the interval.
|
void |
clear()
Clear the interval of values.
|
int |
getNumValues()
Returns the number of values in it.
|
int |
getOptimalClass()
Returns the optimal class.
|
double[] |
getValues()
Returns the values of the interval.
|
int |
optimalClass(int numClases,
long seed,
boolean ultimoIntervalo)
Finds the optimal class for the interval.
|
void |
print()
Prints on the standard output the interval.
|
void |
setClass(int c,
int indice)
Sets a class that belong to the interval.
|
public Interval(int small, int tamanio)
small
- SMALL flag.tamanio
- size of the interval.public void add(double dato)
dato
- value to add.public void setClass(int c, int indice)
c
- given class.indice
- index where to set it.public int getNumValues()
public int getOptimalClass()
public double[] getValues()
public void clear()
public int optimalClass(int numClases, long seed, boolean ultimoIntervalo)
numClases
- number of classes.seed
- Seed for the random number generator.ultimoIntervalo
- Last interval flag.public void print()