|
||||||||||
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 java.util.Random |
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.util.Random |
getRandomGenerator()
Returns the used uniform random number generator; |
abstract double |
nextDouble()
Returns a random number from the distribution. |
abstract int |
nextInt()
|
void |
setRandomGenerator(java.util.Random randomGenerator)
Sets the uniform random generator internally used. |
Methods inherited from class org.apache.mahout.math.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Random randomGenerator
Constructor Detail |
---|
protected AbstractDistribution()
Method Detail |
---|
public double apply(double dummy)
apply
in interface org.apache.mahout.math.function.DoubleFunction
public int apply(int dummy)
apply
in interface IntFunction
dummy
- argument passed to the function.
public abstract double nextDouble()
public abstract int nextInt()
public java.util.Random getRandomGenerator()
public void setRandomGenerator(java.util.Random randomGenerator)
randomGenerator
- the new PRNG
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |