00001 /* 00002 * $Id$ 00003 * 00004 * Author: David Fournier 00005 * Copyright (c) 2008-2012 Regents of the University of California 00006 */ 00011 #include <fvar.hpp> 00012 00017 dvariable inv_cumd_exponential(const prevariable& y) 00018 { 00019 if (y<=0.5) 00020 return log(2.0*y); 00021 else 00022 return log(2.0*(1-y)); 00023 } 00024 00029 dvariable cumd_exponential(const prevariable& x) 00030 { 00031 if (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:35 for ADMB Documentation by 1.8.0 |