ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
cgamdens.cpp
Go to the documentation of this file.
00001 /*
00002   $Id$
00003 
00004   Author: David Fournier
00005   Copyright (c) 2008-2012 Regents of the University of California
00006  */
00012 //double get_values(double x,double y,int print_switch);
00013 #include "fvar.hpp"
00014 
00024 double gamma_density(double x,double r, double mu)
00025 {
00026   return exp(r*log(mu) + (r-1)*log(x)-mu*x-gammln(r));
00027 }
00028 
00038 double log_gamma_density(double x,double r, double mu)
00039 {
00040   return r*log(mu) + (r-1)*log(x)-mu*x-gammln(r);
00041 }