ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
vtdev.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  */
00011 #include <fvar.hpp>
00012 
00017 dvariable t_deviate(const prevariable& _x,const prevariable& _a)
00018 {
00019   prevariable& x= (prevariable&)(_x);
00020   prevariable& a= (prevariable&)(_a);
00021 
00022   dvariable y=cumd_norm(x);
00023 
00024   y=.9999*y+.00005;
00025 
00026   dvariable z=inv_cumd_t(a,y);
00027 
00028   return z;
00029 }