|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.PersistentObject
org.apache.mahout.math.jet.random.AbstractDistribution
public abstract class AbstractDistribution
Field Summary | |
---|---|
protected RandomEngine |
randomGenerator
|
Constructor Summary | |
---|---|
protected |
AbstractDistribution()
Makes this class non instantiable, but still let's others inherit from it. |
Method Summary | |
---|---|
double |
apply(double dummy)
Equivalent to nextDouble(). |
int |
apply(int dummy)
Equivalent to nextInt(). |
java.lang.Object |
clone()
Returns a deep copy of the receiver; the copy will produce identical sequences. |
protected RandomEngine |
getRandomGenerator()
Returns the used uniform random number generator; |
static RandomEngine |
makeDefaultGenerator()
Constructs and returns a new uniform random number generation engine seeded with the current time. |
byte |
nextByte()
|
char |
nextChar()
|
abstract double |
nextDouble()
Returns a random number from the distribution. |
float |
nextFloat()
|
int |
nextInt()
Returns a random number from the distribution; returns (int) Math.round(nextDouble()). |
long |
nextLong()
|
protected void |
setRandomGenerator(RandomEngine randomGenerator)
Sets the uniform random generator internally used. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RandomEngine randomGenerator
Constructor Detail |
---|
protected AbstractDistribution()
Method Detail |
---|
public double apply(double dummy)
apply
in interface DoubleFunction
public int apply(int dummy)
apply
in interface IntFunction
dummy
- argument passed to the function.
public java.lang.Object clone()
clone
in class PersistentObject
protected RandomEngine getRandomGenerator()
public static RandomEngine makeDefaultGenerator()
MersenneTwister
.
public abstract double nextDouble()
public int nextInt()
public byte nextByte()
public char nextChar()
public long nextLong()
public float nextFloat()
protected void setRandomGenerator(RandomEngine randomGenerator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |