swarm.random
Interface BinomialDist

All Known Implementing Classes:
BinomialDistImpl

public interface BinomialDist
extends UnsignedDistribution, UnsignedDistributionS

Binomial distribution. The binomial distribution gives the discrete probability of obtaining exactly n successes out of N Bernoulli trials


Method Summary
 int getNumTrials()
          The getNumTrials returns number of trials parameter.
 double getProbability()
          The getProbability returns probability parameter.
 int getUnsignedSample()
          The getIntegerSample returns a sample value using the distribution's current number of trials and probability parameters; causes an error if these parameters have not been previously set.
 int getUnsignedSampleWithNumTrials$withProbability(int aNumTrials, double aProbability)
          The getUnsignedSampleWithOccurRate:andInterval return a sample value for the specified number of trials and probability.
 int getUnsignedSampleWithProbability(double aProbability)
          The getIntegerSampleWithInterval returns a sample value using the distribution's current number of trials and new probability value.
 
Methods inherited from interface swarm.random.ProbabilityDistribution
getCurrentCount, getGenerator, getOptionsInitialized, getVirtualGenerator
 
Methods inherited from interface swarm.objectbase.SwarmObject
getCompleteProbeMap, getProbeForMessage, getProbeForVariable, getProbeMap
 
Methods inherited from interface swarm.random.InternalState
getMagic, getStateSize
 
Methods inherited from interface swarm.defobj.Drop
drop
 
Methods inherited from interface swarm.defobj.DefinedObject
compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 
Methods inherited from interface swarm.defobj.GetName
getName
 

Method Detail

getNumTrials

public int getNumTrials()
The getNumTrials returns number of trials parameter.

getProbability

public double getProbability()
The getProbability returns probability parameter.

getUnsignedSample

public int getUnsignedSample()
The getIntegerSample returns a sample value using the distribution's current number of trials and probability parameters; causes an error if these parameters have not been previously set.
Specified by:
getUnsignedSample in interface UnsignedDistribution

getUnsignedSampleWithProbability

public int getUnsignedSampleWithProbability(double aProbability)
The getIntegerSampleWithInterval returns a sample value using the distribution's current number of trials and new probability value. Causes an error if the number of trials has not been previously set.

getUnsignedSampleWithNumTrials$withProbability

public int getUnsignedSampleWithNumTrials$withProbability(int aNumTrials,
                                                          double aProbability)
The getUnsignedSampleWithOccurRate:andInterval return a sample value for the specified number of trials and probability. Does not change the the distribution's parameter values.