public class DiscreteRandomProducer extends Object
Constructor and Description |
---|
DiscreteRandomProducer(double... probs)
Creates an instance of DiscreteRandomProducer.
|
DiscreteRandomProducer(long seed,
double... probs)
Creates an instance of DiscreteRandomProducer.
|
Modifier and Type | Method and Description |
---|---|
protected Random |
generator() |
Double |
get() |
int |
getInt() |
static double[] |
randomDistribution(int numOfValues)
Generates pseudorandom discrete distribution.
|
static double[] |
randomDistribution(int numOfValues,
long seed)
Generates pseudorandom discrete distribution.
|
int |
size() |
static DiscreteRandomProducer |
uniform(int numOfValues)
Creates a producer of random values from uniform discrete distribution.
|
static DiscreteRandomProducer |
uniform(int numOfValues,
long seed)
Creates a producer of random values from uniform discrete distribution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
noizify, noizify, vectorize, vectorize
public DiscreteRandomProducer(double... probs)
probs
- Discrete distribution probabilities.public DiscreteRandomProducer(long seed, double... probs)
seed
- Seed.probs
- Discrete distribution probabilities.public static DiscreteRandomProducer uniform(int numOfValues)
numOfValues
- Number of distinct values.public static DiscreteRandomProducer uniform(int numOfValues, long seed)
numOfValues
- Number of distinct values.seed
- Seed.public static double[] randomDistribution(int numOfValues)
numOfValues
- Number of distinct values of pseudorandom variable.public static double[] randomDistribution(int numOfValues, long seed)
numOfValues
- Number of distinct values of pseudorandom variable.seed
- Seed.public Double get()
public int getInt()
public int size()
protected Random generator()
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024