## gov.sandia.cognition.statistics Interface Distribution<DataType>

Type Parameters:
`DataType` - Type of data used on the domain of this distribution. For example, a scalar distribution would have DataType of Double, and a multivariate distribution would have a DataType of Vector.
All Superinterfaces:
Cloneable, CloneableSerializable, Serializable
All Known Subinterfaces:
ClosedFormComputableDiscreteDistribution<DataType>, ClosedFormComputableDistribution<DataType>, ClosedFormCumulativeDistributionFunction<DomainType>, ClosedFormDiscreteUnivariateDistribution<DomainType>, ClosedFormDistribution<DataType>, ClosedFormUnivariateDistribution<NumberType>, ComputableDistribution<DomainType>, CumulativeDistributionFunction<NumberType>, DataDistribution<DataType>, DataDistribution.PMF<KeyType>, DiscreteDistribution<DataType>, DistributionWithMean<DataType>, EstimableDistribution<ObservationType,DistributionType>, InvertibleCumulativeDistributionFunction<NumberType>, ProbabilityDensityFunction<DataType>, ProbabilityFunction<DataType>, ProbabilityMassFunction<DataType>, RandomVariable<DataType>, SmoothCumulativeDistributionFunction, SmoothUnivariateDistribution, UnivariateDistribution<NumberType>, UnivariateProbabilityDensityFunction
All Known Implementing Classes:

`public interface Distribution<DataType>extends CloneableSerializable`

Describes a very high-level distribution of data. Basically, this is an object that can be sampled according to its distribution of data.

Since:
3.0
Author:
Kevin R. Dixon

Method Summary
` DataType` `sample(Random random)`
Draws a single random sample from the distribution.
` ArrayList<? extends DataType>` ```sample(Random random, int numSamples)```
Draws multiple random samples from the distribution.

Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
`clone`

Method Detail

### sample

`DataType sample(Random random)`
Draws a single random sample from the distribution.

Parameters:
`random` - Random-number generator to use in order to generate random numbers.
Returns:
Sample drawn according to this distribution.

### sample

```ArrayList<? extends DataType> sample(Random random,
int numSamples)```
Draws multiple random samples from the distribution. It is generally more efficient to use this multiple-sample method than multiple calls of the single-sample method. (But not always.)

Parameters:
`random` - Random-number generator to use in order to generate random numbers.
`numSamples` - Number of samples to draw from the distribution.
Returns:
Samples drawn according to this distribution.