public abstract class AbstractContinuousDistribution extends AbstractDistribution implements ContinuousDistribution, java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
double |
density(double x)
Return the probability density for a particular point.
|
double |
inverseCumulativeProbability(double p)
For this distribution, X, this method returns the critical point x, such
that P(X < x) =
p. |
void |
reseedRandomGenerator(long seed)
Reseeds the random generator used to generate samples.
|
double |
sample()
Generates a random value sampled from this distribution.
|
double[] |
sample(int sampleSize)
Generates a random sample from the distribution.
|
cumulativeProbabilityequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcumulativeProbability, cumulativeProbabilitypublic double density(double x)
throws MathRuntimeException
x - The point at which the density should be computed.MathRuntimeException - if the specialized class hasn't implemented this functionpublic double inverseCumulativeProbability(double p)
throws MathException
p.inverseCumulativeProbability in interface ContinuousDistributionp - the desired probabilitypMathException - if the inverse cumulative probability can not be
computed due to convergence or other numerical errors.java.lang.IllegalArgumentException - if p is not a valid
probability.public void reseedRandomGenerator(long seed)
seed - the new seedpublic double sample()
throws MathException
MathException - if an error occurs generating the random valuepublic double[] sample(int sampleSize)
throws MathException
sample() in a loop.sampleSize - number of random values to generateMathException - if an error occurs generating the samplejava.lang.IllegalArgumentException - if sampleSize is not positiveCopyright © 2010 - 2023 Adobe. All Rights Reserved