73 for(i = 1; i <= n; i++)
76 nll += -k(i)*
log(lambda(i))+lambda(i)+
gammln(k(i)+1.);
Base class for dvariable.
double gammln(double xx)
Log gamma function.
void RETURN_ARRAYS_DECREMENT(void)
Decrements gradient_structure::RETURN_ARRAYS_PTR.
Vector of double precision numbers.
dvariable dpois(const double &k, const prevariable &lambda)
Library of statistic functions.
unsigned int size_count(const dvector &x)
Returns total size of elements in vector x.
void RETURN_ARRAYS_INCREMENT(void)
Increments gradient_structure::RETURN_ARRAYS_PTR.
Fundamental data type for reverse mode automatic differentiation.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.