|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.function.DoubleFunction
org.apache.mahout.math.jet.random.AbstractDistribution
org.apache.mahout.math.jet.random.AbstractContinousDistribution
org.apache.mahout.math.jet.random.Normal
public class Normal
Implements a normal distribution specified mean and standard deviation.
Constructor Summary | |
---|---|
Normal(double mean,
double standardDeviation,
Random randomGenerator)
|
Method Summary | |
---|---|
double |
cdf(double x)
Returns the cumulative distribution function. |
double |
nextDouble()
Returns a random number from the distribution. |
double |
pdf(double x)
Returns the probability density function. |
void |
setRandomGenerator(Random randomGenerator)
Sets the uniform random generator internally used. |
void |
setState(double mean,
double standardDeviation)
Sets the mean and variance. |
String |
toString()
Returns a String representation of the receiver. |
Methods inherited from class org.apache.mahout.math.jet.random.AbstractContinousDistribution |
---|
nextInt |
Methods inherited from class org.apache.mahout.math.jet.random.AbstractDistribution |
---|
apply, apply, getRandomGenerator, randomDouble |
Methods inherited from class org.apache.mahout.math.function.DoubleFunction |
---|
isDensifying |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Normal(double mean, double standardDeviation, Random randomGenerator)
mean
- The mean of the resulting distribution.standardDeviation
- The standard deviation of the distribution.randomGenerator
- The random number generator to use. This can be null if you don't
need to generate any numbers.Method Detail |
---|
public double cdf(double x)
cdf
in class AbstractContinousDistribution
public double pdf(double x)
pdf
in class AbstractContinousDistribution
public double nextDouble()
nextDouble
in class AbstractDistribution
public final void setRandomGenerator(Random randomGenerator)
setRandomGenerator
in class AbstractDistribution
randomGenerator
- the new PRNGpublic final void setState(double mean, double standardDeviation)
mean
- The new value for the mean.standardDeviation
- The new value for the standard deviation.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |