public class WeightedFloatRandomSampler extends PersistentObject
| Constructor and Description |
|---|
WeightedFloatRandomSampler()
Calls BlockedRandomSampler(1,null).
|
WeightedFloatRandomSampler(int weight,
FloatRandomEngine randomGenerator)
Chooses exactly one random element from successive blocks of
weight input elements each.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a deep copy of the receiver.
|
int |
getWeight() |
boolean |
sampleNextElement()
Chooses exactly one random element from successive blocks of
weight input elements each.
|
void |
setWeight(int weight)
Not yet commented.
|
static void |
test(int weight,
int size)
Not yet commented.
|
public WeightedFloatRandomSampler()
public WeightedFloatRandomSampler(int weight,
FloatRandomEngine randomGenerator)
weight - the weight.randomGenerator - a random number generator. Set this parameter to null
to use the default random number generator.public Object clone()
clone in class PersistentObjectpublic int getWeight()
public boolean sampleNextElement()
public void setWeight(int weight)
weight - intpublic static void test(int weight,
int size)
Jump to the Parallel Colt Homepage