Class Binomial
java.lang.Object
common.distributions.Distribution
common.distributions.discrete.Binomial
- All Implemented Interfaces:
ServiceStrategy, Cloneable
Binomial distribution: number of successes in n independent trials, each with probability p.
-
Nested Class Summary
Nested classes/interfaces inherited from class Distribution
Distribution.Parameter, Distribution.ValueChecker -
Field Summary
Fields inherited from class Distribution
all, allWithMean, c, checker, classpath, description, df, discreteDistributions, hasC, hasMean, image, isNestable, mean, name, nestableDistributions, parameterClasspath, parameters, precondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetC(double value) Sets the variation coefficient C for this distributionprotected voidsetCM(double mean, double c) protected ImageIconsetImage()Sets explicative image of this distribution used, together with description, to help the user to understand meaning of parametersvoidsetMean(double value) Sets the mean for this distributionprotected Distribution.Parameter[]Used to set parameters of this distributiontoString()Returns this distribution's short descriptionvoidupdateCM()This method has to be called whenever a parameter changes andhasMeanorhasCis trueMethods inherited from class Distribution
checkInfinitesimalGeneratorMatrix, checkProbabilityVector, checkTransitionRateMatrix, checkValue, clone, equals, findAll, findAllDiscrete, findAllWithMean, findNestableDistributions, formatNumber, getC, getClassPath, getDescription, getImage, getMean, getName, getNumberOfParameters, getParameter, getParameter, getParameterClassPath, getPrecondition, hasC, hasMean, isNestable, normalizeProbabilityVector, setValueChecker
-
Constructor Details
-
Binomial
public Binomial()Constructs a new Binomial Distribution
-
-
Method Details
-
setParameters
Used to set parameters of this distribution- Specified by:
setParametersin classDistribution- Returns:
- distribution parameters
-
setImage
Description copied from class:DistributionSets explicative image of this distribution used, together with description, to help the user to understand meaning of parameters- Specified by:
setImagein classDistribution- Returns:
- explicative image
-
toString
Description copied from class:DistributionReturns this distribution's short description- Specified by:
toStringin classDistribution- Returns:
- distribution's short description
-
setMean
public void setMean(double value) Description copied from class:DistributionSets the mean for this distribution- Overrides:
setMeanin classDistribution- Parameters:
value- mean value
-
setC
public void setC(double value) Description copied from class:DistributionSets the variation coefficient C for this distribution- Overrides:
setCin classDistribution- Parameters:
value- variation coefficient C value
-
setCM
protected void setCM(double mean, double c) -
updateCM
public void updateCM()Description copied from class:DistributionThis method has to be called whenever a parameter changes andhasMeanorhasCis true- Overrides:
updateCMin classDistribution
-