00001 /* 00002 * $Id$ 00003 * 00004 * Author: David Fournier 00005 * Copyright (c) 2008-2012 Regents of the University of California 00006 */ 00011 #include <df1b2fun.h> 00012 00017 df1b2variable inv_cumd_exponential(const df1b2variable& y) 00018 { 00019 if (value(y)<=0.5) 00020 return log(2.0*y); 00021 else 00022 return log(2.0*(1-y)); 00023 } 00024 00029 df1b2variable cumd_exponential(const df1b2variable& x) 00030 { 00031 if (value(x)<=0.0) 00032 return 0.5*exp(x); 00033 else 00034 return 1.0-0.5*exp(-x); 00035 }
Generated on Tue Mar 8 2016 19:51:31 for ADMB Documentation by 1.8.0 |