46 #if !defined(__DF1B2FUN__)
49 #if defined(__GNUC__) && (__GNUC__ < 3)
58 #if !defined(_MSC_VER)
84 #if defined (INCLUDE_BLOCKSIZE)
91 #ifndef TINY_AD_USE_TINY_VEC
92 #define TINY_AD_USE_TINY_VEC 1
100 #ifndef TINY_AD_INTEGRATE_H
104 #if defined(__DERCHECK__)
113 virtual void get_ind_index(
void)
115 cerr <<
"cannot use this type here" <<
endl;
ad_exit(1);
129 dercheck_info(
int _node_number,
double _delta,
int _index);
130 void set_delta(
double d){delta=d;}
131 void set_node_number(
int n){node_number=n;}
132 void set_pass_number(
int n){pass_number=n;}
133 void set_index(
int n){index=n;}
134 void set_dotflag(
int n){dotflag=n;}
135 void set_vartype(
int n){vartype=n;}
136 void set_counter(
int n){counter=n;}
137 void set_f1(
double d){f1=d;}
138 void set_f2(
double d){f2=d;}
139 void set_f3(
double d){f3=d;}
140 void set_fd(
void){fd=(f2-f3)/(2.0*delta);}
142 extern dercheck_info * derchecker;
169 #if defined(__BORLANDC__)
170 int adptr_diff(
void *
x,
void * y) {
return int(x)-int(y); }
179 #define AD_ALLOCATE(ptr,type,n,classname) \
180 if ( (ptr = new type[n])==NULL) \
182 cerr << AD_allocation_error_message << "classname" << endl; \
188 #define ADUNCONST(type,obj) type & obj = (type&) _##obj;
204 #if defined(__x86_64) || (defined(_MSC_VER) && defined(_M_X64))
218 #if defined(__x86_64) || (defined(_MSC_VER) && defined(_M_X64))
253 {
p=_p;
lb=_lb,
ub=_ub;}
311 #if defined(USE_DDOUBLE)
314 #define double dd_real
345 double d2f,
double d3f,
int bflag=0);
347 double df2,
double df11,
double df12,
double df22,
348 double df111,
double df112,
double df122,
double df222,
int bflag=0);
411 double (*
df)(double);
417 double (*
d2f)(
double),
double (*_d3f)(
double),
434 double (*
f)(double,double);
435 double (*
df1)(double,double);
436 double (*
df2)(double,double);
448 double (*_f)(
double,
double),
449 double (*_df1)(
double,
double),
double (*_df2)(
double,
double),
450 double (*
d2f11)(
double,
double),
451 double (*
d2f12)(
double,
double),
452 double (*
d2f22)(
double,
double),
453 double (*_d3f111)(
double,
double),
454 double (*_d3f112)(
double,
double),
455 double (*_d3f122)(
double,
double),
456 double (*_d3f222)(
double,
double),
470 double (*
f)(double,double);
471 double (*
df1)(double,double);
472 double (*
df2)(double,double);
483 double (*_f)(
double,
double),
484 double (*_df1)(
double,
double),
double (*_df2)(
double,
double),
485 double (*
d2f11)(
double,
double),
486 double (*
d2f12)(
double,
double),
487 double (*
d2f22)(
double,
double),
488 double (*_d3f111)(
double,
double),
489 double (*_d3f112)(
double,
double),
490 double (*_d3f122)(
double,
double),
491 double (*_d3f222)(
double,
double)
578 void write(
const size_t n);
657 void write(
const size_t);
725 void write(
const size_t n);
739 class df1b2function2c;
748 #if defined(CHECK_COUNT)
749 static int ncount_check;
750 static set_ncount_check(
int n){ncount_check=n;}
763 unsigned int bufsize1,
unsigned int nbufsize1,
764 unsigned int bufsize2,
unsigned int nbufsize2,
const adstring& filename);
788 df1b2function2c * pf);
790 df1b2function2c * pf);
816 double df_x,
double df_y,
double df_z,
817 double df_xx,
double df_xy,
double df_xz,
double df_yy,
818 double df_yz,
double df_zz,
843 static unsigned int n;
844 static void allocate(
const unsigned int _n);
848 operator double* (){
return p;}
978 void allocate(
int lb,
int ub,
const char *);
993 # if defined(OPT_LIB)
1059 return static_cast<unsigned int>(
1077 void allocate(
int nrl,
int nrh,
int ncl,
int nch);
1079 void allocate(
int nrl,
int nrh,
int ncl,
int nch,
const char *);
1097 #if defined(OPT_LIB)
1109 throw std::bad_alloc();
1133 return static_cast<unsigned int>(
1136 df1b23array(
int nrl,
int nrh,
int ncl,
int nch,
int,
int);
1148 void allocate(
int nrl,
int nrh,
int ncl,
int nch,
int,
int);
1149 void allocate(
int nrl,
int nrh,
int,
int);
1151 void allocate(
int nrl,
int nrh,
int ncl,
int nch,
int,
int,
const char *);
1154 const int nrl,
const int nrh,
1156 const int nxl,
const int nxh,
1174 # if defined(OPT_LIB)
1362 #if (defined(__GNUC__) && defined(__i386)) || (defined(_MSC_VER) && defined(_M_IX86))
1372 virtual void set_index(
int aflag,
const int& ii)=0;
1413 virtual void set_index(
int aflag,
const int& ii);
1426 const index_type& cmax,
int ps,
const char * s)
1438 inline void allocate(
int rmin,
int rmax,
int cmin,
int cmax)
1442 inline void allocate(
int rmin,
int rmax,
int cmin,
int cmax,
int ps,
1448 inline void allocate(
int rmin,
int rmax,
int cmin,
int cmax,
const char * s)
1452 inline void allocate(
int rmin,
int rmax,
int cmin,
int cmax,
double,
double,
1461 virtual void set_index(
int aflag,
const int& ii);
1479 virtual void set_index(
int aflag,
const int& ii);
1502 #if defined(OPT_LIB)
1512 void allocate(
int min1,
int max1,
const char * s);
1531 void allocate(
double _minb,
double _maxb,
int _phase_start,
1532 const char * s=
"UNNAMED");
1535 void allocate(
double _minb,
double _maxb,
const char * s=
"UNNAMED");
1558 #if defined(OPT_LIB)
1591 void allocate(
int,
int,
double,
double,
int,
const char *);
1592 void allocate(
int,
int,
double,
double,
const char *);
1593 void allocate(
int,
int,
double,
double);
1649 void allocate(
int,
int,
int,
int,
double,
double,
int,
const char *);
1652 void allocate(
int,
int,
int,
int,
double,
double,
const char *);
1655 void allocate(
int,
int,
int,
int,
double,
double);
1715 return -double(1.0)*
x;
1724 return -double(1.0)*
x;
1940 virtual void get_cM(
void)=0;
2149 double bound=0.999999);
df1b2matrix(void)
Description not yet available.
init_df1b2vector(void)
Default constructor.
Description not yet available.
static int num_initial_df1b2params_sav
void operator=(const dmatrix &M)
void read_buffer(void)
Description not yet available.
double(* d3f222)(double, double)
double factln(double n)
Log-factorial .
Description not yet available.
static const int max_num_quadratic_prior
d3_array tan(const d3_array &arr3)
Returns d3_array results with computed tan from elements in arr3.
void read(const test_smartlist &, void *, int nsize)
double report_usage(void)
void allocate(int rmin, int rmax, int cmin, int cmax, const char *s)
void get_cHessian_from_vHessian(dmatrix, int)
Description not yet available.
void initialize(void)
Description not yet available.
void write_buffer(void)
Description not yet available.
static void reset(const init_df1b2vector &, const df1b2variable &)
Description not yet available.
initial_df1b2params * P_INITIAL_DF1B2PARAMS
void operator=(const dvar_matrix &M)
Description not yet available.
static void reset_all(const dvector &)
Description not yet available.
double log_comb(double n, double k)
Log of the binomial coefficent; i.e log of 'n choose k'.
static void set_yes_derivatives(void)
void check_buffer_size(const size_t)
Description not yet available.
df1b2_gradlist * f1b2gradlist
double(* d3f122)(double, double)
d3_array elem_prod(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements product of a(i, j, k) * b(i, j, k).
initial_df1b2params(void)
Description not yet available.
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
void set_dependent_variable(const df1b2variable &_x)
Description not yet available.
static adpool * adpool_vector[]
virtual void get_cM(void)=0
double inv_cumd_t(double n, double u, double eps)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
void operator=(const df1b2matrix &M)
Assigns df1v2quadratic_re with values from m.
dvector lower_triangular_solve(const dmatrix &m, const dvector &v)
Description not yet available.
~df1b2quadratic_prior(void)
Destructor.
void set_noreadflag(int n)
void read_pass1_1(void)
Description not yet available.
Uses polymorphism to get index information from various data types to be used in constructing and all...
void memcpy(test_smartlist &dest, void *source, const size_t nsize)
memcpy for test_smartlist
df1b2vector & operator[](int i) const
static void set_no_derivatives(void)
static do_naught_kludge do_naught_kludge_a
Description not yet available.
void allocate(void)
Description not yet available.
double calculate_importance_sample_block_diagonal(const dvector &x, const dvector &u0, const dmatrix &Hess, const dvector &_xadjoint, const dvector &_uadjoint, const dmatrix &_Hessadjoint, function_minimizer *pmin)
Description not yet available.
void write_buffer_one_less(void)
Description not yet available.
fixed_list_entry * recend
double(* d3f222)(double, double)
mydf1b2function2(double(*_f)(double, double), double(*_df1)(double, double), double(*_df2)(double, double), double(*d2f11)(double, double), double(*d2f12)(double, double), double(*d2f22)(double, double), double(*_d3f111)(double, double), double(*_d3f112)(double, double), double(*_d3f122)(double, double), double(*_d3f222)(double, double))
double calculate_importance_sample(const dvector &x, const dvector &u0, const dmatrix &Hess, const dvector &_xadjoint, const dvector &_uadjoint, const dmatrix &_Hessadjoint, function_minimizer *pmin)
Description not yet available.
virtual void add_to_list(void)
Description not yet available.
static dvar_matrix get_Hessian_contribution(void)
dvector get_cgradient(void)
Description not yet available.
Description not yet available.
double inv_cumd_exponential(double y)
Description not yet available.
Description not yet available.
~fixed_smartlist()
Destructor.
normal_df1b2quadratic_prior(void)
Description not yet available.
Description not yet available.
fixed_smartlist2(void)
Default constructor.
df1b2matrix & operator+=(const df1b2matrix &M)
Description not yet available.
df1b2matrix & operator[](int i)
double norm_to_gamma(double v, double alpha, double bound)
Description not yet available.
void operator++(void)
Description not yet available.
virtual void set_old_style_flag(void)
Description not yet available.
int withinbound(int lb, int n, int ub)
Description not yet available.
static int num_quadratic_prior
double gammln(double xx)
Log gamma function.
double_ptr_vector(int mmin, int mmax)
Constructor vector of ad_double_ptr with dimension [mmin to mmax].
double(* d3f112)(double, double)
df1b2matrix choleski_decomp_extra(const df1b2matrix &M)
char AD_allocation_error_message[]
void ADMB_getcallindex(int)
Description not yet available.
df1b23array & operator+=(const df1b23array &M)
init_df1b2variable(double v=0.0)
Description not yet available.
df1b2variable & operator=(const df3_one_variable &v)
virtual void set_old_style_flag(void)=0
void write_buffer(void)
Description not yet available.
double dfposfun(const double &x, const double eps)
Adjoint code for posfun; possibly not used.
smartlist(unsigned int bufsize, const adstring &filename)
Constructor.
constant_quadratic_re_penalty(void)
Description not yet available.
void operator=(const dmatrix &M)
Description not yet available.
double besselY(double x, int nu)
fixed_smartlist()
Default constructor.
virtual ~df1b2variable()
Destructor.
double sumsq(const d3_array &a)
Description not yet available.
dvariable get_function(void)
Description not yet available.
double pbeta(const double x, const double a, const double b, int maxit)
beta distribution function for constant objects (alias of ibeta function with same arguments order as...
d3_array operator-(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements addition of a(i, j, k) + b(i, j, k).
static void get_Lxu_contribution(dmatrix &)
dmatrix trans(const dmatrix &m1)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double bounded_cumd_norm(const double x, double beta)
Description not yet available.
~quadratic_prior(void)
Destructor.
dmatrix expm(const dmatrix &A)
Matrix exponential.
void rewind(void)
Rewind buffer.
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void allocate(int rmin, int rmax, const index_type &cmin, const index_type &cmax, const char *s)
Vector of double precision numbers.
double inv_cumd_gamma(double y, double a)
~df1b2matrix()
Destructor.
Description not yet available.
unsigned int get_num_active_parameters(void)
double *& operator[](int i)
static const int adpool_stack_size
~df1b23array()
Destructor.
df1b2function_tweaker(double eps, double mult)
Description not yet available.
static int allocation_counter
static void save_adpool_pointer(void)
Description not yet available.
predf1b2vector(df1b2vector *_p, int _lb, int _ub)
double(* d3f111)(double, double)
Description not yet available.
re_df1b2_init_bounded_vector * pv
static void set_minder(int n)
init_df1b2variable & operator()(int i)
double(* d3f112)(double, double)
static int separable_flag
static void get_cgradient_contribution(dvector, int)
Description not yet available.
df1b2_gradlist * localf1b2gradlist
df1b2variable lgamma2(const df1b2variable &_x)
static unsigned int nvar_vector[]
double robust_normal_mixture_deviate(double x, double spread)
Description not yet available.
static void set_blocksize(void)
Description not yet available.
void fmin(double f, const independent_variables &x, const dvector &g, const int &n, const dvector &w, const dvector &h, const fmm_control &fmc)
double(* f)(double, double)
void print_dot_derivatives(df1b2_header *px, const char *s)
void allocate(int rmin, int rmax, const index_type &cmin, const index_type &cmax, int ps, const char *s)
double besselJ(double x, int nu)
Description not yet available.
df1b2_gradlist(unsigned int bufsize, unsigned int nbufsize, unsigned int bufsize1, unsigned int nbufsize1, unsigned int bufsize2, unsigned int nbufsize2, const adstring &filename)
Description not yet available.
double sum(const d3_array &darray)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void operator-=(int)
Description not yet available.
double(* d2f22)(double, double)
double(* d3f111)(double, double)
static re_objective_function_value * pobjfun
void copy(const df1b2vector &)
Description not yet available.
~df1b2_init_number_vector()
Destructor.
void allocate(const size_t bufsize, const adstring &filename)
double calculate_importance_sample_shess(const dvector &x, const dvector &u0, const dmatrix &Hess, const dvector &_xadjoint, const dvector &_uadjoint, const dmatrix &_Hessadjoint, function_minimizer *pmin)
Description not yet available.
double qbeta(double x, double a, double b, double eps)
Description not yet available.
static dmatrix get_cHessian_contribution(void)
int adptr_diff(void *x, void *y)
void restore_end(void)
Restore end.
d3_array operator+(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements addition of a(i, j, k) + b(i, j, k).
df1_one_variable atan(const df1_one_variable &x)
void reset(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array elem_div(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements division of a(i, j, k) / b(i, j, k).
virtual void get_Lxu(dmatrix &)=0
normal_quadratic_prior(void)
Description not yet available.
void allocate(const size_t bufsize, const adstring &filename)
Description not yet available.
dvector evaluate_function_with_quadprior(const dvector &x, int usize, function_minimizer *pfmin)
Description not yet available.
void allocate(int rmin, int rmax, int cmin, int cmax, int ps, const char *s)
d3_array sin(const d3_array &arr3)
Returns d3_array results with computed sin from elements in arr3.
void operator=(const df1b2variable &_x)
Description not yet available.
df1b2_init_number()
Description not yet available.
static void get_cHessian_contribution_from_vHessian(dmatrix, int)
Description not yet available.
double(* d3f122)(double, double)
void save_end(void)
Description not yet available.
static const int max_num_quadratic_prior
df1_two_variable fabs(const df1_two_variable &x)
void initialize(void)
Description not yet available.
void allocate(void)
Do not allocate, but just initialize class members.
int make_sure_df1b2fun_gets_linked
void save_end(void)
Description not yet available.
void initialize(void)
Description not yet available.
Description not yet available.
Description not yet available.
void restoreposition(int offset)
static const int adpool_vectorsize
void set_phase_start(int n)
d3_array cube(const d3_array &m)
Description not yet available.
static initial_df1b2params ** varsptr
dvector lower_triangular_solve_trans(const dmatrix &M, const dvector &y)
Description not yet available.
df1b2variable * getv(void)
dvar_matrix get_Hessian(void)
Description not yet available.
static dvar_vector get_gradient_contribution(void)
dvar_vector posfun(const dvar_vector &x, double eps, const prevariable &pen)
Description not yet available.
static init_df1b2variable ** list
virtual void set_old_style_flag(void)
void ncount_checker(int ncount, int ncount_check)
void allocate(void)
Does not allocate, but initialize member variables.
df1b2variable & operator()(int i) const
void allocate(const size_t bufsize, const adstring &filename)
Description not yet available.
~fixed_smartlist2()
Destructor.
static unsigned int get_nvar()
Description not yet available.
df1b2_init_number & operator[](int i)
df1b2variable & operator()(int i, int j) const
random_effects_bounded_vector_info operator()(int i)
void set_u_dot(void)
Description not yet available.
df1b2function2(double(*_f)(double, double), double(*_df1)(double, double), double(*_df2)(double, double), double(*d2f11)(double, double), double(*d2f12)(double, double), double(*d2f22)(double, double), double(*_d3f111)(double, double), double(*_d3f112)(double, double), double(*_d3f122)(double, double), double(*_d3f222)(double, double), const adstring &funame="unnamed")
Description not yet available.
double gamma_density(double x, double r, double mu)
Gamma probability density function; constant objects.
void restoreposition(void)
int write_pass1c(const df1b2variable *px, double y, df1b2variable *pz, df1b2function2c *pf)
double(* f)(double, double)
df1b2variable & operator+=(const df1b2variable &v)
Description not yet available.
Description not yet available.
double mean(const dvector &vec)
Returns computed mean of vec.
double norm(const d3_array &a)
Return computed norm value of a.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
Description not yet available.
double(* d2f11)(double, double)
double besselI(double x, int nu)
void deallocate(void)
Description not yet available.
static void cleanup_dfpMinv()
void allocate(const dvar_vector &_u, const char *s)
Description not yet available.
Description not yet available.
void restoreposition(void)
df1b2variable & operator/=(const df1b2variable &v)
Description not yet available.
Description not yet available.
Description not yet available.
Description not yet available.
df1b2matrix & operator=(const df3_one_matrix &)
static void save_varsptr(void)
Description not yet available.
double dflogistic(double a, double b, const double &x)
df1_one_matrix choleski_decomp(const df1_one_matrix &MM)
This is a function object for a function of one variable which stores the functions which calculate t...
random_effects_bounded_vector_info(re_df1b2_init_bounded_vector *_pv, int _i)
dvariable invlogit(dvariable x)
Inverse logit function.
ivector sgn(const dvector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double inv_cumd_beta_stable(double a, double b, double y, double eps)
dmatrix operator*(const d3_array &t, const dvector &v)
Description not yet available.
Description not yet available.
static int adpool_stack_pointer
static void set_maxder(int n)
dvar_vector get_gradient(void)
Description not yet available.
d3_array mfexp(const d3_array &m)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
static dvariable get_quadratic_priors(void)
Description not yet available.
Description not yet available.
~init_df1b2vector()
Destructor.
void deallocate(void)
If no other copies exist, free df1b2variable::ptr.
int write_pass1_pluseq(const df1b2variable *px, df1b2variable *pz)
Description not yet available.
static int adpool_use_index[]
double(* d2f22)(double, double)
void initialize(void)
Description not yet available.
double sfabs(const double v1)
Description not yet available.
double evaluate_function(const dvector &x, function_minimizer *pfmin)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int write_pass1_minuscv(const df1b2variable *py, df1b2variable *pz)
static int num_initial_df1b2params
int write_pass1_prod(double x, const df1b2variable *py, df1b2variable *pz)
Description not yet available.
dvector solve(const dmatrix &aa, const dvector &z)
Solve a linear system using LU decomposition.
df1b2vector & operator=(const df3_one_vector &)
void operator=(double x)
Description not yet available.
void operator--(void)
Description not yet available.
df1b2vector & shift(int)
Description not yet available.
void allocate(int min1, int max1, const double_index_type &bmin, const double_index_type &bmax, const char *s)
Description not yet available.
df1b2variable operator()(const df1b2variable &x)
Description not yet available.
double bounder(double x, double min, double max, double scale)
Description not yet available.
Description not yet available.
~ad_dstar(void)
Description not yet available.
void reset(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
prnstream & endl(prnstream &)
void restoreposition(int offset)
double besselK(double x, int nu)
dmatrix get_cHessian(void)
void allocate(int rmin, int rmax, int cmin, int cmax)
Array of integers(int) with indexes from index_min to indexmax.
int max_num_init_df1b2variable
Description not yet available.
df1b2variable & operator*=(const df1b2variable &v)
Description not yet available.
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void restoreposition(void)
void noallocate(int lib, int ub)
Description not yet available.
re_objective_function_value & operator=(const df1b2variable &v)
Description not yet available.
~df1b2vector()
Destructor.
void print_derivatives(const adstring &s, double f, double df, double d2f, double d3f, int bflag)
Description not yet available.
void operator++(void)
Description not yet available.
void operator=(const df1b2matrix &)
int write_pass1_minus(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz)
Description not yet available.
void allocate(void)
Description not yet available.
dmatrix check_second_derivatives(const init_df1b2vector &x)
Description not yet available.
void restore_end(void)
Set to end of file ptr.
void set_scalefactor(const double)
Set scale factor for parameter in RE model.
dvector rowsum(const dmatrix &matrix)
Returns dvector where each element contains the sum total of each row in matrix.
~df1b2_init_bounded_number_vector()
Description not yet available.
df1b2variable operator()(const df1b2variable &x, const df1b2variable &y)
Description not yet available.
virtual ~df1b2_init_vector()
double calculate_importance_sample_block_diagonal_option_antithetical(const dvector &x, const dvector &u0, const dmatrix &Hess, const dvector &_xadjoint, const dvector &_uadjoint, const dmatrix &_Hessadjoint, function_minimizer *pmin)
Description not yet available.
fixed_list_entry * buffer
df1b2variable mult_add(const df1b2variable &x, const df1b2variable &y)
Description not yet available.
Description not yet available.
static int no_derivatives
double report_usage(void)
void operator=(const dvar_matrix &)
Description not yet available.
Description not yet available.
Description not yet available.
fixed_list_entry * true_buffer
void add_buffer_fringe(int n)
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
dvector first_difference(const dvector &values)
Returns dvector containing the differences of an values(i) and values(i + 1) for i = 1 to values...
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
df1b2_init_bounded_number & operator[](int i)
virtual void set_old_style_flag(void)
Description not yet available.
dvariable inv_cumd_normal_logistic_mixture(const prevariable &_yy, double a)
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
int write_pass1_eq(const df1b2variable *px, df1b2variable *pz)
Description not yet available.
double colsum(const dmatrix &m, int col)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void write(const size_t n)
Description not yet available.
df1b2variable get_function(void)
df1b2_init_bounded_number_vector()
Default constructor.
dvariable log_der_logistic(double a, double b, const prevariable &x)
Description not yet available.
void read_buffer(void)
Description not yet available.
ad_dstar(void)
Description not yet available.
Description not yet available.
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
double do_gauss_hermite_block_diagonal_multi(const dvector &x, const dvector &u0, const dmatrix &Hess, const dvector &_xadjoint, const dvector &_uadjoint, const dmatrix &_Hessadjoint, function_minimizer *pmin)
Description not yet available.
double(* d2f11)(double, double)
test_smartlist(void)
Default constructor.
virtual void set_old_style_flag(void)
df1b2variable mypow(const df1b2variable &x, double y)
Description not yet available.
df1b2quadratic_prior(void)
Default constructor.
int mywrite_pass1(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz, mydf1b2function2 *pf)
double(* df2)(double, double)
dmatrix get_hessian(const init_df1b2vector &_x)
Description not yet available.
void operator+=(int)
Description not yet available.
dvariable beta(const prevariable &a, const prevariable &b)
Beta density function.
d3_array check_third_derivatives(const init_df1b2vector &x)
Description not yet available.
static int stddev_scale(const dvector &d, const dvector &x)
Description not yet available.
df1b2matrix & operator*=(const df1b2variable &x)
Description not yet available.
static dvariable get_quadratic_priors(void)
df1b2matrix & operator-=(const df1b2matrix &M)
Description not yet available.
Description not yet available.
dmatrix outer_prod(const dvector &v1, const dvector &v2)
Description not yet available.
static unsigned int blocksize
void deallocate(void)
Description not yet available.
df1b2_gradlist * globalf1b2gradlist
void reallocate(void)
Description not yet available.
Description not yet available.
Description not yet available.
Description not yet available.
static int get_passnumber(void)
virtual void set_value(const init_df1b2vector &x, const int &_ii, const df1b2variable &pen)
Description not yet available.
double betai(const double a, const double b, const double x, int maxit)
Incomplete beta function for constant objects.
int write_pass1_minuseq(const df1b2variable *px, df1b2variable *pz)
Description not yet available.
static df1b2quadratic_prior * ptr[]
static int pool_allocation_number[]
unsigned int num_active_parameters
void deallocate(void)
If no other copies exists, free allocated memory.
double get_scalefactor()
Description not yet available.
void write_buffer(void)
Description not yet available.
void set_value(const dvar_matrix &x, const dvar_vector &v, const int &_ii, double s)
Description not yet available.
double norm2(const d3_array &a)
Return sum of squared elements in a.
void set_phase_start(int n)
static dvar_matrix get_Hessian_contribution(void)
void operator=(const dvar_matrix &M)
Description not yet available.
void set_phase_start(int n)
Description not yet available.
df1b2variable operator()(const df1b2variable &x, const df1b2variable &y)
double robust_normal_logistic_mixture_deviate(double x, double spread)
Description not yet available.
int write_pass1_initialize(df1b2variable *pz)
Description not yet available.
init_df1b2variable * trueptr
double ln_det(const dmatrix &m1, int &sgn)
Compute log determinant of a constant matrix.
df1b2_init_bounded_number & operator()(int i)
double(* d2f12)(double, double)
void check_shape(const df1b2vector &x, const df1b2vector &y, const char *s)
Description not yet available.
Description not yet available.
double(* df1)(double, double)
double(* d2f12)(double, double)
int write_pass1(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz, df1b2function2 *pf)
Description not yet available.
void get_cHessian(dmatrix, int)
Description not yet available.
static void get_vHessian_contribution(dvar_matrix, int)
Description not yet available.
friend class xf_df1b2vector
static dvar_vector get_gradient_contribution(void)
Description not yet available.
static void set_nvar(unsigned int n)
df1b2variable & operator[](int i) const
static int num_quadratic_prior
re_objective_function_value(void)
Description not yet available.
double lower_triangular_ln_det(const dmatrix &m)
Holds "shape" information for vector objects.
df1b2vector(void)
Default constructor.
void write(const test_smartlist &, void *, int nsize)
d3_array cos(const d3_array &arr3)
Returns d3_array results with computed cos from elements in arr3.
static void cleanup_pMinv()
void allocate(int min1, int max1, const index_type &phase_start, const char *s)
Allocate vector of df1b2_init_bounded number with dimension [min1 to max1].
fixed_list_entry * buffend
dvar_vector get_gradient(void)
static void allocate(const unsigned int _n)
void initialize(void)
Initialize.
void print_is_diagnostics(laplace_approximation_calculator *lapprox)
Description not yet available.
df1b2vector & operator/=(const df1b2vector &x)
Description not yet available.
quadratic_re_penalty(void)
Description not yet available.
ostream & operator<<(const ostream &_s, preshowpoint p)
Description not yet available.
void operator+=(const int)
Description not yet available.
void add_to_list(void)
Description not yet available.
double do_gauss_hermite_block_diagonal(const dvector &x, const dvector &u0, const dmatrix &Hess, const dvector &_xadjoint, const dvector &_uadjoint, const dmatrix &_Hessadjoint, function_minimizer *pmin)
Description not yet available.
double report_usage(void)
Description not yet available.
re_df1b2_init_bounded_vector(void)
Description not yet available.
Description not yet available.
df1b2variable(const do_naught_kludge &)
virtual void set_value(const init_df1b2vector &x, const int &_ii, const df1b2variable &pen)
Description not yet available.
static df1b2quadratic_prior * get_ptr(int i)
static unsigned int get_blocksize(void)
Description not yet available.
void restoreposition(int offset)
static int have_bounded_random_effects
Description not yet available.
void check_buffer_size(const size_t)
Description not yet available.
void set_value(const dvector &)
Description not yet available.
df1b23array & operator=(const df1b23array &)
void operator-=(const int)
Description not yet available.
df1b2vector & operator++(void)
int active(const initial_params &ip)
Class definition of matrix with derivitive information .
void set_phase_start(int n)
Description not yet available.
df1b2_init_number_vector()
Default constructor.
void get_cgradient(dvector, int)
Description not yet available.
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
Description not yet available.
double inv_cumd_cauchy(const double &x)
Description not yet available.
void get_vHessian(dvar_matrix, int)
Description not yet available.
void write_buffer_one_less(void)
Description not yet available.
int write_pass1x(const df1b2variable *_px, df1b2variable *pz, df1b2function1 *pf)
Description not yet available.
Description not yet available.
Description not yet available.
df1b2quadratic_re_penalty(void)
Description not yet available.
df1b2vector & operator*=(const df1b2vector &x)
Description not yet available.
~re_objective_function_value()
Description not yet available.
virtual int & get_ind_index(void)
Description not yet available.
static int get_in_qp_calculations()
double evaluate_function_quiet(const dvector &x, function_minimizer *pfmin)
Description not yet available.
double logistic(double a, double b, const double &x)
Description not yet available.
unsigned int size_count(const dvector &x)
Returns total size of elements in vector x.
static quadratic_prior * ptr[]
dvariable boundp(const prevariable &x, double fmin, double fmax, const prevariable &_fpen, double s)
Compute penalty for exceeding bounds on parameter; variable ojbects.
double cumd_exponential(double x)
Description not yet available.
static int set_index(void)
Description not yet available.
init_df1b2variable & operator[](int i)
void write(const size_t n)
void read_buffer(void)
Read buffer.
void allocate(int rmin, int rmax, int cmin, int cmax, double, double, const char *s)
fixed_list_entry * true_buffend
Description not yet available.
static void increment_adpool_counter(void)
Description not yet available.
double sign(const double x)
The sign of a number.
void deallocate(void)
Similar to destructor.
df1b2variable(void)
Default constructor.
~double_ptr_vector()
Destructor.
static unsigned int adpool_nvar_stack[]
unsigned int size() const
void checkidentiferstring(const char *ids, test_smartlist &list)
Description not yet available.
Description not yet available.
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
dvector column(const dmatrix &matrix, int j)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
df1b2_init_bounded_number * v
double *& operator()(int i)
void save_end(void)
Description not yet available.
static void get_cHessian_contribution(dmatrix, int)
Description not yet available.
void restoreposition(void)
df1b2function1(double(*_f)(double), double(*_df)(double), double(*d2f)(double), double(*_d3f)(double), const adstring &s="unnamed")
Description not yet available.
void initialize(void)
Description not yet available.
void read_pass1_2(void)
Description not yet available.
void operator=(const df1b2matrix &M)
Assigns normal_df1b2quadratic_prior with values from m.
static lmatrix * pointer_table
Description not yet available.
double(* df2)(double, double)
static initial_df1b2params ** varsptr_sav
static int get_num_quadratic_prior(void)
df1b2variable operator()(const df1b2variable &)
Description not yet available.
double log_density_poisson(double x, double mu)
Log Poisson density; constant objects.
dvector value(const df1_one_vector &v)
df1b23array & operator-=(const df1b23array &M)
double calculate_importance_sample_block_diagonal_funnel(const dvector &x, const dvector &u0, const dmatrix &Hess, const dvector &_xadjoint, const dvector &_uadjoint, const dmatrix &_Hessadjoint, function_minimizer *pmin)
Description not yet available.
friend class df1b2variable
Description not yet available.
int write_pass1_minusvc(const df1b2variable *py, df1b2variable *pz)
void deallocate(void)
Description not yet available.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
double(* df1)(double, double)
int get_offset(int xs)
Description not yet available.
Description not yet available.
~test_smartlist()
Destructor.
dvariable posfun2(const dvariable &x, const double eps, const prevariable &pen)
Retuns a positive function of the argument and sets a penalty for .
void colfill(const int j, const df1b2vector &v)
Copy vector values into column j of df1b2matrix.
quadratic_prior(void)
Default constructor.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
void add_buffer_fringe(int n)
void check_pool_depths(void)
Description not yet available.
double cumd_norm(const double &x)
Culative normal distribution; constant objects.
void initialize(void)
Description not yet available.
void allocate(void)
Description not yet available.
static dvector get_cgradient_contribution(void)
double beta_deviate(double a, double b, double x, double eps)
Description not yet available.
static int adpool_counter
Description not yet available.
static adpool * adpool_stack[]
unsigned int size() const
static quadratic_prior * get_ptr(int i)
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)=0
df1b2vector & operator--(void)
static int get_num_quadratic_prior(void)
static double fun_without_pen
df1b2_init_number & operator()(int i)
double log_negbinomial_density(double x, double mu, double tau)
void set_noreadflag(int n)
df1b2variable & operator-=(const df1b2variable &v)
Description not yet available.
int write_save_pass2_tilde_values(const df1b2variable *px)
Description not yet available.
int write_pass1_sum(double x, const df1b2variable *py, df1b2variable *pz)
Description not yet available.
dvar_matrix get_Hessian(void)
void check_buffer_size(const size_t)
Description not yet available.
static void restore_varsptr(void)
Description not yet available.
void deallocate(void)
Deallocates class memory memory.
Description not yet available.
double report_usage(void)
double inv_cumd_normal_mixture(double yy, double a)
Description not yet available.
double evaluate_function_no_derivatives(const dvector &x, function_minimizer *pfmin)
Description not yet available.
void allocate(void)
Initialize df1b2vector to empty.
void reset(void)
Description not yet available.
Description not yet available.
double calculate_importance_sample_block_diagonal_option2(const dvector &x, const dvector &u0, const dmatrix &Hess, const dvector &_xadjoint, const dvector &_uadjoint, const dmatrix &_Hessadjoint, function_minimizer *pmin)
Description not yet available.
double square(const double value)
Return square of value; constant object.
df1b23array(void)
Description not yet available.
Description not yet available.
Fundamental data type for reverse mode automatic differentiation.
df1_one_variable inv(const df1_one_variable &x)
virtual void set_old_style_flag(void)
Description not yet available.
void restore_end(void)
Description not yet available.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
virtual void set_old_style_flag(void)
Description not yet available.
df1b2vector & operator-=(const df1b2vector &x)
Description not yet available.
df1b2variable div(const df1b2variable &x, const df1b2variable &y)
Description not yet available.
void df1b2_gradcalc1(void)
Description not yet available.
double fourth(const double m)
Fourth power of a number; constant objects.
df1b2vector & operator+=(const df1b2vector &x)
Description not yet available.
double log_gamma_density(double x, double r, double mu)
Log gamma probability density function; constant objects.
void restoreposition(int offset)
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
static void restore_adpool_pointer(void)
Description not yet available.
static int current_allocation_index
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
d3_array pow(const d3_array &m, int e)
Description not yet available.
void allocate(const df1b2_init_vector &_u, const char *s)
df1b2_gradlist ** f1b2gradlist_stack
void rewind(void)
Description not yet available.
static int separable_calculation_type
static void get_M_calculations(void)
Description not yet available.
void add_buffer_fringe(int n)
double gamma_deviate(double _x, double _a)
friend class random_effects_bounded_vector_info
constant_df1b2quadratic_re_penalty(void)
dvector asin(const dvector &vec)
Returns dvector with principal value of the arc sine of vec, expressed in radians.
int get_local_nvar(void) const
friend class df1b2_parameters
df1b2variable & operator()(int i, int j, int k)
df1b2matrix & operator/=(const df1b2variable &x)
Description not yet available.
void set_noreadflag(int n)
virtual void set_value(const dvector &, const int &ii)=0
static int in_qp_calculations