jhplot.fit
Class NegativeBinomial

java.lang.Object
  extended by hep.aida.ref.event.AIDAObservable
      extended by hep.aida.ref.ManagedObject
          extended by hep.aida.ref.function.AbstractIFunction
              extended by jhplot.fit.NegativeBinomial
All Implemented Interfaces:
hep.aida.dev.IDevManagedObject, hep.aida.IFunction, hep.aida.IManagedObject, hep.aida.IModelFunction, Connectable, FunctionDispatcher, java.lang.Cloneable

public class NegativeBinomial
extends AbstractIFunction

Negative binomial distribution. Returns the sum of the terms 0 through k of the Negative Binomial Distribution.

   k
   --  ( n+j-1 )   n      j
   >   (       )  p  (1-p)
   --  (   j   )
  j=0
 
In a sequence of Bernoulli trials, this is the probability that k or fewer failures precede the n-th success.

The terms are not computed individually; instead the incomplete beta integral is employed, according to the formula

y = negativeBinomial( k, n, p ) = Gamma.incompleteBeta( n, k+1, p ). All arguments must be positive, p[0] - scale factor
p[1] - the number of trials.
p[2] - the probability of success (must be in (0.0,1.0)).


Constructor Summary
NegativeBinomial()
           
NegativeBinomial(java.lang.String title)
           
NegativeBinomial(java.lang.String[] variableNames, java.lang.String[] parameterNames)
           
 
Method Summary
 double value(double[] v)
          Get value of this function
 
Methods inherited from class hep.aida.ref.function.AbstractIFunction
addFunctionListener, annotation, clone, codeletString, dimension, excludeNormalizationAll, gradient, includeNormalizationAll, indexOfParameter, isEqual, isNormalized, normalizationParameter, normalizationRange, normalize, numberOfParameters, parameter, parameterGradient, parameterNames, parameters, providesGradient, providesNormalization, providesParameterGradient, removeFunctionListener, setCodeletString, setParameter, setParameters, setTitle, title, variableName, variableNames
 
Methods inherited from class hep.aida.ref.ManagedObject
isFillable, name, setFillable, setName, type, typeForClass
 
Methods inherited from class hep.aida.ref.event.AIDAObservable
addListener, isConnected, removeAllListeners, removeListener, setConnected, setValid, setValidForAll
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.aida.ref.event.Connectable
isConnected, setConnected
 

Constructor Detail

NegativeBinomial

public NegativeBinomial()

NegativeBinomial

public NegativeBinomial(java.lang.String title)

NegativeBinomial

public NegativeBinomial(java.lang.String[] variableNames,
                        java.lang.String[] parameterNames)
Method Detail

value

public double value(double[] v)
Get value of this function

Specified by:
value in interface hep.aida.IFunction
Specified by:
value in class AbstractIFunction


jHepWork 2.8 (©) S.Chekanov