public class WeightedDoubleRandomSampler extends PersistentObject
Constructor and Description |
---|
WeightedDoubleRandomSampler()
Calls BlockedRandomSampler(1,null).
|
WeightedDoubleRandomSampler(int weight,
DoubleRandomEngine 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 WeightedDoubleRandomSampler()
public WeightedDoubleRandomSampler(int weight, DoubleRandomEngine 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 PersistentObject
public 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