@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
|
clonesample, sampleequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsample, sampleclonepublic 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()
DistributionWithMeangetMean in interface DistributionWithMean<java.lang.Double>public double getMeanAsDouble()
UnivariateDistributiongetMeanAsDouble in interface UnivariateDistribution<java.lang.Double>public void sampleInto(java.util.Random random,
int sampleCount,
java.util.Collection<? super java.lang.Double> output)
DistributionsampleInto 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()
VectorizableconvertToVector in interface Vectorizablepublic void convertFromVector(Vector parameters)
VectorizableconvertFromVector in interface Vectorizableparameters - The parameters to incorporate.public double getVariance()
UnivariateDistributiongetVariance in interface UnivariateDistribution<java.lang.Double>public DeterministicDistribution.CDF getCDF()
UnivariateDistributiongetCDF in interface ClosedFormUnivariateDistribution<java.lang.Double>getCDF in interface UnivariateDistribution<java.lang.Double>public java.lang.Double getMinSupport()
UnivariateDistributiongetMinSupport in interface UnivariateDistribution<java.lang.Double>public java.lang.Double getMaxSupport()
UnivariateDistributiongetMaxSupport in interface UnivariateDistribution<java.lang.Double>public java.util.Set<java.lang.Double> getDomain()
DiscreteDistributiongetDomain in interface DiscreteDistribution<java.lang.Double>public int getDomainSize()
DiscreteDistributiongetDomainSize in interface DiscreteDistribution<java.lang.Double>public DeterministicDistribution.PMF getProbabilityFunction()
ComputableDistributiongetProbabilityFunction in interface ComputableDistribution<java.lang.Double>getProbabilityFunction in interface DiscreteDistribution<java.lang.Double>