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.
|
cumulativeProbability
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cumulativeProbability, cumulativeProbability
public 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 ContinuousDistribution
p
- the desired probabilityp
MathException
- 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 positive"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"