@PublicationReference(author="Wikipedia", title="Degenerate distribution", type=WebPage, year=2009, url="http://en.wikipedia.org/wiki/Degenerate_distribution") public class DeterministicDistribution extends AbstractClosedFormUnivariateDistribution<java.lang.Double> implements ClosedFormDiscreteUnivariateDistribution<java.lang.Double>
Modifier and Type | Class and Description |
---|---|
static class |
DeterministicDistribution.CDF
CDF of the deterministic distribution.
|
static class |
DeterministicDistribution.PMF
PMF of the deterministic distribution.
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_POINT
Default point, 0.0
|
Constructor and Description |
---|
DeterministicDistribution()
Creates a new instance of DeterministicDistribution
|
DeterministicDistribution(DeterministicDistribution other)
Copy Constructor
|
DeterministicDistribution(double point)
Creates a new instance of DeterministicDistribution
|
Modifier and Type | Method and Description |
---|---|
void |
convertFromVector(Vector parameters)
Converts the object from a Vector of parameters.
|
Vector |
convertToVector()
Converts the object to a vector.
|
DeterministicDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution.
|
java.util.Set<java.lang.Double> |
getDomain()
Returns an object that allows an iteration through the domain
(x-axis, independent variable) of the Distribution
|
int |
getDomainSize()
Gets the size of the domain.
|
java.lang.Double |
getMaxSupport()
Gets the minimum support (domain or input) of the distribution.
|
java.lang.Double |
getMean()
Gets the arithmetic mean, or "first central moment" or "expectation",
of the distribution.
|
double |
getMeanAsDouble()
Gets the mean of the distribution as a double.
|
java.lang.Double |
getMinSupport()
Gets the minimum support (domain or input) of the distribution.
|
double |
getPoint()
Getter for point
|
DeterministicDistribution.PMF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution,
either the PDF or PMF.
|
double |
getVariance()
Gets the variance of the distribution.
|
void |
sampleInto(java.util.Random random,
int sampleCount,
java.util.Collection<? super java.lang.Double> output)
Draws multiple random samples from the distribution and puts the result
into the given collection.
|
void |
setPoint(double point)
Setter for point
|
clone
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sample, sample
clone
public static final double DEFAULT_POINT
public DeterministicDistribution()
public DeterministicDistribution(double point)
point
- Location of the distributionpublic DeterministicDistribution(DeterministicDistribution other)
other
- DeterministicDistribution to copypublic double getPoint()
public void setPoint(double point)
point
- Location of the distributionpublic java.lang.Double getMean()
DistributionWithMean
getMean
in interface DistributionWithMean<java.lang.Double>
public double getMeanAsDouble()
UnivariateDistribution
getMeanAsDouble
in interface UnivariateDistribution<java.lang.Double>
public void sampleInto(java.util.Random random, int sampleCount, java.util.Collection<? super java.lang.Double> output)
Distribution
sampleInto
in interface Distribution<java.lang.Double>
random
- Random number generator to use.sampleCount
- The number of samples to draw. Cannot be negative.output
- The collection to add the samples into.public Vector convertToVector()
Vectorizable
convertToVector
in interface Vectorizable
public void convertFromVector(Vector parameters)
Vectorizable
convertFromVector
in interface Vectorizable
parameters
- The parameters to incorporate.public double getVariance()
UnivariateDistribution
getVariance
in interface UnivariateDistribution<java.lang.Double>
public DeterministicDistribution.CDF getCDF()
UnivariateDistribution
getCDF
in interface ClosedFormUnivariateDistribution<java.lang.Double>
getCDF
in interface UnivariateDistribution<java.lang.Double>
public java.lang.Double getMinSupport()
UnivariateDistribution
getMinSupport
in interface UnivariateDistribution<java.lang.Double>
public java.lang.Double getMaxSupport()
UnivariateDistribution
getMaxSupport
in interface UnivariateDistribution<java.lang.Double>
public java.util.Set<java.lang.Double> getDomain()
DiscreteDistribution
getDomain
in interface DiscreteDistribution<java.lang.Double>
public int getDomainSize()
DiscreteDistribution
getDomainSize
in interface DiscreteDistribution<java.lang.Double>
public DeterministicDistribution.PMF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction
in interface ComputableDistribution<java.lang.Double>
getProbabilityFunction
in interface DiscreteDistribution<java.lang.Double>