public class valueAssociations
extends java.lang.Object
This class stores a frequency list of classes for a given value, i.e. for a same value in a attribute, it stores the number of times a determined class is associated with the value.
Modifier and Type | Field and Description |
---|---|
protected FreqList |
list
Frequency list of classes for a given value
|
protected double |
value
Associated value.
|
Constructor and Description |
---|
valueAssociations(double value1)
Creates a new instance of valueAssociations
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(double elem)
This method adds an element (a class) to the list
|
int |
getCurrentFreq()
Returns the frequency of the class pointed by the current state of the list's iterator
|
java.lang.String |
getCurrentValue()
Obtains the value of the class pointed by the current state of the list's iterator
|
double |
getValue()
The reference value of this object
|
void |
iterate()
Iterates to the next element in the list
|
boolean |
outOfBounds()
Tests if the iterator is out of the bounds of the list
|
void |
reset()
Resets the iterator of the list to the beginning
|
int |
totalElems()
Gives the total number of elements in the list (i.e. the sum of the frequencies).
|
protected FreqList list
protected double value
public valueAssociations(double value1)
Creates a new instance of valueAssociations
public void addElement(double elem)
This method adds an element (a class) to the list
elem
- The index of the class we want to addpublic void reset()
Resets the iterator of the list to the beginning
public int getCurrentFreq()
Returns the frequency of the class pointed by the current state of the list's iterator
public java.lang.String getCurrentValue()
Obtains the value of the class pointed by the current state of the list's iterator
public void iterate()
Iterates to the next element in the list
public boolean outOfBounds()
Tests if the iterator is out of the bounds of the list
public int totalElems()
Gives the total number of elements in the list (i.e. the sum of the frequencies).
public double getValue()
The reference value of this object