|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rapidminer.tools.container.ValueSet
public class ValueSet
This class represents a set of (weighted) double values. Might be e.g. used to obtain all distinct values or to efficiently store a large number of values out of a relatively small domain.
Constructor Summary | |
---|---|
ValueSet()
|
Method Summary | |
---|---|
void |
add(double value)
Add a value to the set. |
void |
add(double value,
double weight)
Add a value with a weight to the set. |
boolean |
contains(double value)
Returns whether the set contains the given value. |
double |
getMode()
Returns the most common of the values in the set. |
java.util.Iterator<java.lang.Double> |
iterator()
Returns an iterator over the values. |
int |
size()
Returns the number of values in the set. |
java.util.Iterator<java.util.Map.Entry<java.lang.Double,java.lang.Double>> |
weightedValuesIterator()
Returns an iterator over entries each consisting of a value and its weight. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValueSet()
Method Detail |
---|
public void add(double value, double weight)
public void add(double value)
public boolean contains(double value)
public java.util.Iterator<java.lang.Double> iterator()
iterator
in interface java.lang.Iterable<java.lang.Double>
public java.util.Iterator<java.util.Map.Entry<java.lang.Double,java.lang.Double>> weightedValuesIterator()
public int size()
public double getMode()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |