public static class UniformDistribution.CDF extends UniformDistribution implements SmoothCumulativeDistributionFunction, InvertibleCumulativeDistributionFunction<java.lang.Double>
UniformDistribution.CDF, UniformDistribution.MaximumLikelihoodEstimator, UniformDistribution.PDF
DEFAULT_MAX, DEFAULT_MIN
Constructor and Description |
---|
CDF()
Creates a new instance of CDF
|
CDF(double minSupport,
double maxSupport)
Creates a new instance of CDF
|
CDF(UniformDistribution other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
UniformDistribution.CDF |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
java.lang.Double |
differentiate(java.lang.Double input)
Differentiates the output with respect to the input
|
double |
evaluate(double input)
Produces a double output for the given double input
|
java.lang.Double |
evaluate(java.lang.Double input)
Evaluates the function on the given input and returns the output.
|
static double |
evaluate(double input,
double minSupport,
double maxSupport)
Evaluates the Uniform(minSupport,maxSupport) CDF for the given input
|
double |
evaluateAsDouble(java.lang.Double input)
Evaluates the scalar function as a double.
|
UniformDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution.
|
UniformDistribution.PDF |
getDerivative()
Gets the closed-form derivative of the function.
|
java.lang.Double |
inverse(double probability)
Computes the inverse of the CDF for the given probability.
|
convertFromVector, convertToVector, getEstimator, getMaxSupport, getMeanAsDouble, getMinSupport, getProbabilityFunction, getVariance, sample, sampleInto, setMaxSupport, setMinSupport
getMean, sampleAsDouble, sampleAsDoubles, sampleInto
sample
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMean, getProbabilityFunction, sampleAsDouble, sampleAsDoubles, sampleInto
getMaxSupport, getMeanAsDouble, getMinSupport, getVariance
sample, sample, sampleInto
convertFromVector, convertToVector
public CDF()
public CDF(double minSupport, double maxSupport)
minSupport
- Minimum x bound on the distributionmaxSupport
- Maximum bound on the distributionpublic CDF(UniformDistribution other)
other
- UniformDistribution to copypublic UniformDistribution.CDF clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.clone
in interface Vectorizable
clone
in interface CloneableSerializable
clone
in class UniformDistribution
public double evaluate(double input)
UnivariateScalarFunction
evaluate
in interface UnivariateScalarFunction
input
- Input to the Evaluatorpublic java.lang.Double evaluate(java.lang.Double input)
Evaluator
evaluate
in interface Evaluator<java.lang.Double,java.lang.Double>
evaluate
in interface ScalarFunction<java.lang.Double>
evaluate
in interface UnivariateScalarFunction
input
- The input to evaluate.public double evaluateAsDouble(java.lang.Double input)
ScalarFunction
evaluateAsDouble
in interface ScalarFunction<java.lang.Double>
evaluateAsDouble
in interface UnivariateScalarFunction
input
- The input value.public static double evaluate(double input, double minSupport, double maxSupport)
minSupport
- Minimum x bound on the distributionmaxSupport
- Maximum x bound on the distributioninput
- Input to evaluate the CDF atpublic UniformDistribution.CDF getCDF()
UnivariateDistribution
getCDF
in interface ClosedFormUnivariateDistribution<java.lang.Double>
getCDF
in interface SmoothUnivariateDistribution
getCDF
in interface UnivariateDistribution<java.lang.Double>
getCDF
in class UniformDistribution
public UniformDistribution.PDF getDerivative()
ClosedFormDifferentiableEvaluator
getDerivative
in interface ClosedFormDifferentiableEvaluator<java.lang.Double,java.lang.Double,java.lang.Double>
getDerivative
in interface SmoothCumulativeDistributionFunction
public java.lang.Double differentiate(java.lang.Double input)
DifferentiableEvaluator
differentiate
in interface DifferentiableEvaluator<java.lang.Double,java.lang.Double,java.lang.Double>
input
- Input about which to compute the derivativepublic java.lang.Double inverse(double probability)
InvertibleCumulativeDistributionFunction
inverse
in interface InvertibleCumulativeDistributionFunction<java.lang.Double>
probability
- Probability to invert.