ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
df1b2fun.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  *
7  * ADModelbuilder and associated libraries and documentations are
8  * provided under the general terms of the "BSD" license.
9  *
10  * License:
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions are
14  * met:
15  *
16  * 1. Redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer.
18  *
19  * 2. Redistributions in binary form must reproduce the above copyright
20  * notice, this list of conditions and the following disclaimer in the
21  * documentation and/or other materials provided with the distribution.
22  *
23  * 3. Neither the name of the University of California, Otter Research,
24  * nor the ADMB Foundation nor the names of its contributors may be used
25  * to endorse or promote products derived from this software without
26  * specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  *
40  */
46 #if !defined(__DF1B2FUN__)
47 # define __DF1B2FUN__
48 
49 #if defined(__GNUC__) && (__GNUC__ < 3)
50  #pragma interface
51 #endif
52 
53 #include <adpool.h>
54 #ifndef FVAR_HPP
55 # include <fvar.hpp>
56 #endif
57 #include <sys/stat.h>
58 #if !defined(_MSC_VER)
59  #include <stddef.h>
60  #include <fcntl.h>
61 #endif
62 
63 #define USE_BARD_PEN
64 
65 void ncount_checker(int ncount,int ncount_check);
66 
67 class named_dvar_matrix;
68 
69 int withinbound(int lb,int n,int ub);
70 
71 class do_naught_kludge;
72 class newadkludge;
73 
74 
80 {
81 public:
82  short int ncopies;
83  short int nvar;
84 #if defined (INCLUDE_BLOCKSIZE)
85  int blocksize;
86 #endif
88 };
89 
90 
91 #ifndef TINY_AD_USE_TINY_VEC
92  #define TINY_AD_USE_TINY_VEC 1
93  #include <tiny_ad.hpp>
94 #endif
95 
96 #ifndef TINY_WRAP_H
97  #include <tiny_wrap.hpp>
98 #endif
99 
100 #ifndef TINY_AD_INTEGRATE_H
101  #include <integrate_wrap.hpp>
102 #endif
103 
104 #if defined(__DERCHECK__)
105 
109 class dercheck_info
110 {
111  int ind_index;
112 public:
113  virtual void get_ind_index(void)
114  {
115  cerr << "cannot use this type here" << endl; ad_exit(1);
116  }
117 
118  int node_number;
119  int counter;
120  int pass_number;
121  int vartype;
122  int dotflag;
123  double der_value;
124  double f1;
125  double f2;
126  double f3;
127  double fd;
128  double delta;
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);}
141 };
142 extern dercheck_info * derchecker;
143 #endif
144 
145 typedef void * & vreference;
146 
147 /*
148 #if !defined(_MSC_VER)
149 inline void increment_pointer(vreference p,int n)
150 {
151  char * cs =(char*)(p);
152  cs+=n;
153 }
154 #endif
155 */
156 
157 #include <df32fun.h>
158 class df1b2_gradlist;
163 extern int max_num_init_df1b2variable;
164 
165 void df1b2_gradcalc1(void);
166 
167 extern char AD_allocation_error_message[];
168 
169 #if defined(__BORLANDC__)
170 int adptr_diff(void * x, void * y) { return int(x)-int(y); }
171 #else
172 int adptr_diff(void* x, void* y);
173 #endif
174 
175 void read_pass1_1(void);
176 void read_pass1_2(void);
177 
178 #undef AD_ALLOCATE
179 #define AD_ALLOCATE(ptr,type,n,classname) \
180  if ( (ptr = new type[n])==NULL) \
181  { \
182  cerr << AD_allocation_error_message << "classname" << endl; \
183  ad_exit(1); \
184  }
185 
186 
187 #undef ADUNCONST
188 #define ADUNCONST(type,obj) type & obj = (type&) _##obj;
189 
192 {
193  //double* ptr;
194 
195  double* u;
196  double* u_dot;
197  double* u_bar;
198  double* u_dot_bar;
199  double* u_tilde;
200  double* u_dot_tilde;
201  double* u_bar_tilde;
203  int indindex;
204 #if defined(__x86_64) || (defined(_MSC_VER) && defined(_M_X64))
205  int padding;
206 #endif
207 
210  u(NULL),
211  u_dot(NULL),
212  u_bar(NULL),
213  u_dot_bar(NULL),
214  u_tilde(NULL),
215  u_dot_tilde(NULL),
216  u_bar_tilde(NULL),
217  u_dot_bar_tilde(NULL),
218 #if defined(__x86_64) || (defined(_MSC_VER) && defined(_M_X64))
219  indindex(0), padding(0)
220 #else
221  indindex(0)
222 #endif
223  {
224  }
225 
226  //double * get_ptr(void){return ptr;}
227 
228  double* get_u() const {return u; }
229  double* get_u_dot() const {return u_dot; }
230  double* get_u_bar() const {return u_bar; }
231  double* get_u_dot_bar() const {return u_dot_bar; }
232  double* get_u_tilde() const {return u_tilde; }
233  double* get_u_dot_tilde() const {return u_dot_tilde; }
234  double* get_u_bar_tilde() const {return u_bar_tilde; }
235  double* get_u_dot_bar_tilde() const {return u_dot_bar_tilde; }
236  int& get_ind_index() { return indindex; }
237  const int& get_ind_index() const { return indindex; }
238 };
239  class adkludge1;
240 
241  class df1b2vector;
242 
248  {
250  int lb;
251  int ub;
252  inline predf1b2vector(df1b2vector * _p,int _lb,int _ub)
253  {p=_p;lb=_lb,ub=_ub;}
254  friend class df1b2vector;
255  };
256 
257  class df3_one_variable;
258  class df3_two_variable;
259  class df3_three_variable;
261 
267  {
268  public:
269  double* ptr;
270  int get_local_nvar(void) const {return int(((twointsandptr*)ptr)->nvar);}
271  int allocated(void){return ptr!=0;}
272  int unallocated(void){return ptr==0;}
273  static adpool* pool;
275  static int adpool_use_index[];
277  static int allocation_counter;
278  static const int adpool_vectorsize;
279  static int adpool_counter;
280  static void increment_adpool_counter(void);
281  static const int adpool_stack_size;
283  static adpool* adpool_stack[];
284  static unsigned int adpool_nvar_stack[];
286  static void save_adpool_pointer(void);
287  static void restore_adpool_pointer(void);
288  static unsigned int nvar_vector[];
289  static int passnumber;
290  static unsigned int nvar; // the number of independent variables
291  static int minder; // the number of independent variables
292  static int maxder; // the number of independent variables
293  static unsigned int blocksize;
294  static int noallocate;
295 
296  static int get_passnumber(void){return passnumber;}
297  static void set_nvar(unsigned int n) { nvar = n;}
298  static unsigned int get_nvar() { return nvar; }
299  static void set_minder(int n){minder=n;}
300  static void set_maxder(int n){maxder=n;}
301  static void set_blocksize(void);
302  static unsigned int get_blocksize(void);
303  static unsigned int get_blocksize(const unsigned int n);
304  short int* ncopies;
305  // for fixed size n whole thing is 6n+2
306  void initialize(void);
307  void initialize(const unsigned int n);
308 
310 
311 #if defined(USE_DDOUBLE)
312 #undef double
313  df1b2variable(double d);
314 #define double dd_real
315 #endif
316  df1b2variable(double d);
317  df1b2variable(void);
318  void allocate(void);
319  void allocate(const char *);
320 
321  df1b2variable(adkludge1 * );
323 
324  df1b2variable(const newadkludge * );
325 
326  df1b2variable(const df1b2variable& v);
327 
336 
337  void operator = (double x);
338 
339  virtual ~df1b2variable();
340  void deallocate(void);
341  };
342 
343 void print_dot_derivatives(df1b2_header * px,const char * s);
344 void print_derivatives(const adstring&, double f, double df,
345  double d2f,double d3f,int bflag=0);
346 void print_derivatives(const adstring&, double f, double df1,
347  double df2,double df11,double df12, double df22,
348  double df111, double df112, double df122, double df222,int bflag=0);
349 
350 void print_derivatives(df1b2_header * px,const char * s,
351  int bflag=0);
352 
358  {
359  public:
361  int get_index(void){return ind_index;}
362  static int num_variables;
364  init_df1b2variable(double v=0.0);
365  void operator = (double x);
366  void set_u_dot(void);
367  };
368 
374  {
377  int * ncopies;
380  public:
381  void deallocate(void);
382  void reallocate(void);
383  void allocate(int lib,int ub);
384  void allocate(void);
385  init_df1b2vector(int lib,int ub);
386  init_df1b2vector(void);
388  int indexmin(void) const {return index_min;}
389  int indexmax(void) const {return index_max;}
390 
391 #if defined(OPT_LIB)
392  init_df1b2variable& operator () (int i) { return ptr[i];}
393  init_df1b2variable& operator [] (int i) { return ptr[i];}
394 #else
397 #endif
398  void set_value(const dvector&);
400  };
401 
408 {
409 public:
410  double (*f)(double);
411  double (*df)(double);
412  double (*d2f)(double);
413  double (*d3f)(double);
415 
416  df1b2function1(double (*_f)(double),double (*_df)(double),
417  double (*d2f)(double),double (*_d3f)(double),
418  const adstring& s="unnamed");
419 
421  //df1b2variable& operator () (const df1b2variable& z,const df1b2variable& x);
423  int s); // s is a switch for picking special function for simple
424  // operations like +=
425 };
426 
432  {
433  public:
434  double (*f)(double,double);
435  double (*df1)(double,double);
436  double (*df2)(double,double);
437  double (*d2f11)(double,double);
438  double (*d2f12)(double,double);
439  double (*d2f22)(double,double);
440  double (*d3f111)(double,double);
441  double (*d3f112)(double,double);
442  double (*d3f122)(double,double);
443  double (*d3f222)(double,double);
445 
447  (
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),
457  const adstring & funame="unnamed"
458  );
459 
461  };
462 
468  {
469  public:
470  double (*f)(double,double);
471  double (*df1)(double,double);
472  double (*df2)(double,double);
473  double (*d2f11)(double,double);
474  double (*d2f12)(double,double);
475  double (*d2f22)(double,double);
476  double (*d3f111)(double,double);
477  double (*d3f112)(double,double);
478  double (*d3f122)(double,double);
479  double (*d3f222)(double,double);
480 
482  (
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)
492  );
493 
495  };
496 
502 {
503 public:
504  char* buffer;
505  char* buffend;
506  char* bptr;
507  char* sbptr;
508  unsigned int bufsize;
510  int fp;
511  void saveposition(void){sbptr=bptr;}
512  void reset(void){bptr=buffer;}
514  void restoreposition(int offset){bptr=sbptr+offset;}
515  smartlist(unsigned int bufsize,const adstring& filename);
516  double report_usage(void)
517  {
518  return double(size_t(bptr)-size_t(buffer))
519  / double(size_t(buffend)-size_t(buffer));
520  }
521 };
522 
528  {
529  public:
533  void save_end(void);
534  void restore_end(void);
535  int eof_flag;
537  double * doubleptr;
538  char * true_buffer;
539  char * true_buffend;
540  char * recend;
541  char * buffer;
542  char * buffend;
543  char * bptr;
544  char * sbptr;
545  size_t bufsize;
547  int fp;
548 public:
549  test_smartlist(void);
550  ~test_smartlist();
551 
552  void saveposition(void){sbptr=bptr;}
553  void set_recend(){bptr=recend+1;} // one passed the end so that when
554  // you back up n bytes it points to the
555  // beginning of an n byte record
556  void reset(void);
557  int eof(void){ return eof_flag;}
558  int get_noreadflag(void){ return noreadflag; }
559  void set_noreadflag(int n){ noreadflag=n; }
561  void restoreposition(int offset){bptr=sbptr+offset;}
562  test_smartlist(const size_t bufsize,const adstring& filename);
563  void allocate(const size_t bufsize,const adstring& filename);
564  void read_buffer(void);
565  void set_forward(void){direction=0;}
566  void set_backword(void){direction=-1;}
567  void set_reverse(void){direction=-1;}
568  void rewind(void);
569  void initialize(void);
570  void operator-=(const int);
571  void operator+=(const int);
572  double report_usage(void)
573  {
574  return double(size_t(bptr)-size_t(buffer))
575  / double(size_t(buffend)-size_t(buffer));
576  }
577  //void write(void * p,const size_t n);
578  void write(const size_t n);
579  void write_buffer(void);
580  void check_buffer_size(const size_t);
581  void add_buffer_fringe(int n){buffend-=n;}
582  int written(void){return written_flag;}
583  };
584 
585  typedef void (*ADrfptr)(void);
586 
592  {
593  public:
594  int numbytes;
596  };
597 
603  {
604  public:
605  fixed_smartlist();
606  fixed_smartlist(const size_t bufsize,const adstring& filename);
608 
609  void operator ++ (void);
610  void operator -- (void);
611  size_t nentries;
616  void save_end(void);
617  void restore_end(void);
618  int eof_flag;
620  double * doubleptr;
628  size_t bufsize;
630  int fp;
631  void saveposition(void){sbptr=bptr;}
632  void set_recend(){bptr=recend+1;} // one passed the end so that when
633  // you back up n bytes it points to the
634  // beginning of an n byte record
635  void reset(void);
636  int eof(void){ return eof_flag;}
637  void read_file(void);
638  int get_noreadflag(void){ return noreadflag; }
639  void set_noreadflag(int n){ noreadflag=n; }
641  void restoreposition(int offset){bptr=sbptr+offset;}
642  void allocate(const size_t bufsize,const adstring& filename);
643  void read_buffer(void);
644  void set_forward(void){direction=0;}
645  void set_backword(void){direction=-1;}
646  void set_reverse(void){direction=-1;}
647  void rewind(void);
648  void initialize(void);
649  void operator -= (int);
650  void operator += (int);
651  double report_usage(void)
652  {
653  return double(size_t(bptr)-size_t(buffer))
654  / double(size_t(buffend)-size_t(buffer));
655  }
656  //void write(void * p,int n);
657  void write(const size_t);
658  void write_buffer(void);
659  void write_buffer_one_less(void);
660  void check_buffer_size(const size_t);
661  void add_buffer_fringe(int n){buffend-=n;}
662  int written(void){return written_flag;}
663  };
664 
670  {
671  public:
672  fixed_smartlist2(void);
673  fixed_smartlist2(const size_t bufsize,const adstring& filename);
675 
676  void operator ++ (void);
677  void operator -- (void);
678  size_t nentries;
683  void save_end(void);
684  void restore_end(void);
685  int eof_flag;
687  double * doubleptr;
688  int * true_buffer;
690  int * recend;
691  int * buffer;
692  int * buffend;
693  int * bptr;
694  int * sbptr;
695  size_t bufsize;
697  int fp;
698  void saveposition(void){sbptr=bptr;}
699  void set_recend(){bptr=recend+1;} // one passed the end so that when
700  // you back up n bytes it points to the
701  // beginning of an n byte record
702  void reset(void){bptr=buffer;}
703  int eof(void){ return eof_flag; /*eof_flag=0;*/}
704 
705  void read_file(void);
706  int get_noreadflag(void){ return noreadflag; }
707  void set_noreadflag(int n){ noreadflag=n; }
709  void restoreposition(int offset){bptr=sbptr+offset;}
710  void allocate(const size_t bufsize,const adstring& filename);
711  void read_buffer(void);
712  void set_forward(void){direction=0;}
713  void set_backword(void){direction=-1;}
714  void set_reverse(void){direction=-1;}
715  void rewind(void);
716  void initialize(void);
717  void operator -= (int);
718  void operator += (int);
719  double report_usage(void)
720  {
721  return double(size_t(bptr)-size_t(buffer)) /
722  double(size_t(buffend)-size_t(buffer));
723  }
724  //void write(void * p,int n);
725  void write(const size_t n);
726  void write_buffer(void);
727  void write_buffer_one_less(void);
728  void check_buffer_size(const size_t);
729  void add_buffer_fringe(int n){buffend-=n;}
730  int written(void){return written_flag;}
731  };
732 
733 
734  void write(const test_smartlist &,void *,int nsize);
735  void read(const test_smartlist &,void *,int nsize);
736  void memcpy(test_smartlist&, void*, const size_t nsize);
737  void memcpy(void*, test_smartlist&, const size_t nsize);
738 
739  class df1b2function2c;
740 
746  {
747  public:
748 #if defined(CHECK_COUNT)
749  static int ncount_check;
750  static set_ncount_check(int n){ncount_check=n;}
751 #endif
752  int ncount;
759  static int no_derivatives;
760  static void set_no_derivatives(void) {no_derivatives=1;}
761  static void set_yes_derivatives(void) {no_derivatives=0;}
762  df1b2_gradlist(unsigned int bufsize,unsigned int nbufsize,
763  unsigned int bufsize1, unsigned int nbufsize1,
764  unsigned int bufsize2, unsigned int nbufsize2,const adstring& filename);
765  int mywrite_pass1(const df1b2variable * px, const df1b2variable * py,
766  df1b2variable * pz, mydf1b2function2 * pf);
767  int write_pass1_sum(double x, const df1b2variable * py,
768  df1b2variable * pz);
769  int write_pass1_sum(const df1b2variable * px, const df1b2variable * py,
770  df1b2variable * pz);
771  int write_pass1_prod(double x, const df1b2variable * py,
772  df1b2variable * pz);
773  int write_pass1_prod(const df1b2variable * px, double py,
774  df1b2variable * pz);
775  int write_pass1x(const df1b2variable * _px, df1b2variable * pz,
776  df1b2function1 * pf);
777 
778  int write_pass1_prod(const df1b2vector * px, const df1b2vector * py,
779  df1b2variable * pz);
780 
781  int write_pass1_prod(const df1b2variable * px, const df1b2variable * py,
782  df1b2variable * pz);
783  int write_pass1_minuscv(const df1b2variable * py,df1b2variable * pz);
784  int write_pass1_minusvc(const df1b2variable * py,df1b2variable * pz);
785  int write_pass1_minus(const df1b2variable * px, const df1b2variable * py,
786  df1b2variable * pz);
787  int write_pass1c(const df1b2variable * px, double y, df1b2variable * pz,
788  df1b2function2c * pf);
789  int write_pass1c(double x,const df1b2variable * py, df1b2variable * pz,
790  df1b2function2c * pf);
791  int write_pass1(const df1b2variable * px, const df1b2variable * py,
792  df1b2variable * pz, df1b2function2 * pf);
793  int write_pass1_pluseq(const df1b2variable * px,df1b2variable * pz);
794  int write_pass1_minuseq(const df1b2variable * px,df1b2variable * pz);
796  int write_pass1_eq(const df1b2variable * px,df1b2variable * pz);
797  int write_pass1(const df1b2variable * px,
798  df1b2variable * pz, df1b2function1 * pf);
799  int write_pass1(const df1b2variable * px,
800  df1b2variable * pz, double df, double d2f, double d3f );
801 
802  int write_pass1(const df1b2variable * _px,
803  const df1b2variable * _py,df1b2variable * pz,double df_x,
804  double df_y,
805  double df_xx,
806  double df_xy,
807  double df_yy,
808  double df_xxx,
809  double df_xxy,
810  double df_xyy,
811  double df_yyy);
812 
813  int write_pass1(const df1b2variable * _px,
814  const df1b2variable * _py,const df1b2variable * pw,
815  const df1b2variable * pz,
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,
819  double df_xxx,
820  double df_xxy,
821  double df_xxz,
822  double df_xyy,
823  double df_xyz,
824  double df_xzz,
825  double df_yyy,
826  double df_yyz,
827  double df_yzz,
828  double df_zzz);
829 
830 
831 
833  void reset(void);
834  };
835 
840 class ad_dstar
841 {
842 public:
843  static unsigned int n;
844  static void allocate(const unsigned int _n);
845  double* p;
846  ad_dstar(void);
847  ~ad_dstar(void);
848  operator double* (){return p;}
849 };
850 
851 typedef void (**ADprfptr)(void);
852 typedef void (*ADrfptr)(void);
853 
854 void set_dependent_variable(const df1b2variable& _x);
855 
857 //df1b2variable user_function(const init_df1b2vector& x);
858 
861 
862 // ************************************************************
863 // ************************************************************
864 
866 df1b2variable mfexp(const df1b2variable& x,double b);
867 
868 // ************************************************************
869 // ************************************************************
870 
872 df1b2variable max(const df1b2vector& t1);
875 df1b2variable pow(const df1b2variable& x,double y);
876 df1b2variable mypow(const df1b2variable& x,double y);
877 df1b2variable pow(double x,const df1b2variable& y);
889 df1b2variable operator * (const df1b2variable& x,double y);
891 df1b2variable operator * (double x,const df1b2variable& y);
895 df1b2variable operator + (double x,const df1b2variable& y);
896 df1b2variable operator + (const df1b2variable& x,double y);
897 
902 inline df1b2variable operator + (const df1b2variable& x,double y)
903 {
904  return y+x;
905 }
906 
908 df1b2variable operator - (double x,const df1b2variable& y);
910 df1b2variable operator / (const df1b2variable& x,double y);
911 df1b2variable operator - (const df1b2variable& x,double y);
912 df1b2variable operator / (double x,const df1b2variable& y);
913 
914 df1b2variable lgamma2(const df1b2variable& _x);//new log gamma using forward AD
916 df1b2vector gammln(const df1b2vector& _xx);
917 df1b2variable log_comb(const df1b2variable& n, double k);
919 df1b2variable log_comb(double n, const df1b2variable& k);
921 
922 // vector and matrix stuff
923 
929 {
930 protected:
931  int offset;
934 };
935 
936 class df3_one_vector;
938 class df3_two_vector;
939 
940  // class predf1b2vector
941  // {
942  // df1b2vector * p;
943  // int lb;
944  // int ub;
945  //inline predf1b2vector(df1b2vector * _p,int _lb,int _ub) {p=_p;lb=_lb,ub=_ub;}
946  // friend class df1b2vector;
947  // };
948 
954 {
957 public:
958  inline df1b2vector& operator -- (void)
959  {
960  index_min--;index_max--;v++; return *this;
961  }
962  inline df1b2vector& operator ++ (void)
963  {
964  index_min++;index_max++;v--; return *this;
965  }
966  int pointersize() const { return (int)sizeof(df1b2variable); }
967  inline df1b2variable * getv(void) {return v;}
968  int allocated(void){return v!=0;}
969  int indexmin(void)const {return index_min;}
970  int indexmax(void)const {return index_max;}
971  int size(){return index_max-index_min+1;}
972  df1b2vector(int lb,int ub);
973  df1b2vector(const dvector& v);
974  ~df1b2vector();
975  df1b2vector(const df1b2vector&);
976  void copy(const df1b2vector&);
977  df1b2vector(void);
978  void allocate(int lb,int ub,const char *);
979  void allocate(int lb,int ub);
980  void allocate(const ad_integer&,const ad_integer& ub);
981  void noallocate(int lib,int ub);
982  df1b2vector& shift(int);
983  void allocate(void);
984  void initialize(void);
985  void deallocate(void);
986  int get_offset(void){return offset;}
990  df1b2vector& operator = (double);
993 # if defined(OPT_LIB)
995  {
996  return *((df1b2variable*)((char*)(v)+i*pointersize()));
997  }
999  {
1000  return *((df1b2variable*)((char*)(v)+i*pointersize()));
1001  }
1002  // df1b2vector operator () (int i,int j)
1003  // {
1004  // return predf1b2vector(this,i,j);
1005  // }
1006  // df1b2vector(const predf1b2vector&);
1007 # else
1008  //df1b2vector operator () (int i,int j);
1009  //df1b2variable& operator () const (int i);
1010  df1b2variable& operator () (int i) const;
1011  df1b2variable& operator [] (int i) const;
1012 # endif
1013  df1b2vector operator() (const ivector & iv);
1015  df1b2vector& operator += (const dvector& x);
1016  df1b2vector& operator += (double x);
1018  df1b2vector& operator -= (const dvector& x);
1025  df1b2vector(const predf1b2vector&);
1026  inline df1b2vector operator () (int lb,int ub)
1027  {
1028  return predf1b2vector(this,lb,ub);
1029  }
1031  friend class df1b2variable;
1032  friend class xf_df1b2vector;
1033  //df1b2vector(const funnel_init_df1b2vector& _s);
1034 };
1035 class df3_one_matrix;
1036 class df3_two_matrix;
1037 
1043 {
1048 public:
1049  int allocated(void){return v!=0;}
1050  void initialize(void);
1051  ~df1b2matrix();
1052  void colfill(const int j, const df1b2vector& v);
1053  int rowmin(void) const {return index_min;}
1054  int indexmin(void) const {return index_min;}
1055  int indexmax(void) const {return index_max;}
1056  int rowmax(void) const {return index_max;}
1057  unsigned int size() const
1058  {
1059  return static_cast<unsigned int>(
1060  index_max < index_min ? 0 : index_max - index_min + 1);
1061  }
1062  df1b2matrix(int nrl,int nrh,int ncl,int nch);
1063  df1b2matrix(int nrl,int nrh);
1064  df1b2matrix(const df1b2matrix&);
1065  df1b2matrix(int nrl,int nrh,const index_type& ncl,
1066  const index_type& nch);
1068 
1070  df1b2matrix& operator =(const dmatrix&);
1072  df1b2matrix& operator =(double);
1074  df1b2matrix(void);
1077  void allocate(int nrl,int nrh,int ncl,int nch);
1078  void allocate(int nrl,int nrh);
1079  void allocate(int nrl,int nrh,int ncl,int nch,const char *);
1080  void allocate(int nrl,int nrh,const index_type& ncl,
1081  const index_type& nch);
1082  void allocate(int nrl,int nrh,const index_type& ncl,
1083  const index_type& nch,const char *);
1084  void allocate(void);
1085  void deallocate(void);
1086  df1b2variable& operator()(int i,int j) const;
1087  df1b2vector& operator[](int i) const;
1088  df1b2vector& operator()(int i) const;
1089  int colmin(void) const {return (*(df1b2matrix*)(this))(index_min).indexmin();}
1090  int colmax(void) const {return (*(df1b2matrix*)(this))(index_min).indexmax();}
1091  int colsize(void)const {return colmax()-colmin()+1;}
1094  df1b2matrix& operator *= (double x);
1095  df1b2matrix& operator /= (double x);
1096 };
1097 #if defined(OPT_LIB)
1098 inline df1b2variable& df1b2matrix::operator()(int i,int j) const
1099 {
1100  return (df1b2variable&)(v[i][j]);
1101 }
1103 {
1104  return (df1b2vector&)(v[i]);
1105 }
1107 {
1108  if (!v)
1109  throw std::bad_alloc();
1110  else
1111  return v[i];
1112 }
1113 #endif
1114 
1120 {
1125 public:
1126  int allocated(void){return v!=0;}
1127  void initialize(void);
1128  ~df1b23array();
1129  int indexmin(void){return index_min;}
1130  int indexmax(void){return index_max;}
1131  unsigned int size() const
1132  {
1133  return static_cast<unsigned int>(
1134  index_max < index_min ? 0 : index_max - index_min + 1);
1135  }
1136  df1b23array(int nrl,int nrh,int ncl,int nch,int,int);
1137  df1b23array(int nrl,int nrh);
1138  df1b23array(int nrl,int nrh,int,int);
1139  df1b23array(const df1b23array&);
1140  //df1b23array& operator =(const df3_one_matrix&);
1141 
1144  df1b23array& operator =(double);
1145  df1b23array(void);
1148  void allocate(int nrl,int nrh,int ncl,int nch,int,int);
1149  void allocate(int nrl,int nrh,int,int);
1150  void allocate(int nrl,int nrh);
1151  void allocate(int nrl,int nrh,int ncl,int nch,int,int,const char *);
1152 
1153  void allocate(
1154  const int nrl, const int nrh,
1155  const ivector& ncl, const ivector& nch,
1156  const int nxl, const int nxh,
1157  const char*);
1158 
1159  void allocate(int nrl,int nrh,
1160  const index_type& ncl, const index_type& nch);
1161 
1162  void allocate(int nrl,int nrh,
1163  const index_type& ncl, const index_type& nch,
1164  const index_type& nxl, const index_type& nxh);
1165 
1166  void allocate(int nrl,int nrh,
1167  const index_type& ncl,const index_type& nch,
1168  const index_type& nxl,const index_type& nxh,
1169  const char*);
1170 
1171 
1172  void allocate(void);
1173  void deallocate(void);
1174 # if defined(OPT_LIB)
1175  df1b2variable& operator () (int i,int j,int k){return v[i](j,k);}
1176  df1b2vector& operator () (int i,int j){return v[i][j];}
1177  df1b2matrix& operator () (int i){return v[i];}
1178  df1b2matrix& operator [] (int i){return v[i];}
1179 #else
1180  df1b2variable& operator () (int i,int j,int k);
1181  df1b2vector& operator () (int i,int j);
1182  df1b2matrix& operator () (int i);
1183  df1b2matrix& operator [] (int i);
1184 #endif
1185 };
1186 
1187 
1188 // **************************************
1189 // **************************************
1190 df1b2vector fabs(const df1b2vector& t1);
1191 df1b2vector mfexp(const df1b2vector& x);
1192 df1b2vector exp(const df1b2vector& x);
1193 df1b2vector sqrt(const df1b2vector& x);
1194 df1b2vector sin(const df1b2vector& x);
1195 df1b2vector tan(const df1b2vector& x);
1196 df1b2vector cos(const df1b2vector& x);
1197 df1b2vector log(const df1b2vector& x);
1198 
1199 df1b2matrix mfexp(const df1b2matrix& M);
1200 df1b2matrix log(const df1b2matrix& M);
1201 df1b2matrix trans(const df1b2matrix& M);
1204 df1b2matrix exp(const df1b2matrix& M);
1205 df1b2vector column(const df1b2matrix&,int i);
1208 
1209 df1b2vector operator * (double,const df1b2vector& y);
1210 df1b2vector operator * (const df1b2vector& y,const double);
1211 df1b2variable operator * (const df1b2vector& y,const dvector&);
1212 df1b2variable operator * (const dvector&,const df1b2vector& y);
1215 
1218 
1220 df1b2matrix operator + (const df1b2matrix& M,const dmatrix& N);
1221 
1224 df1b2vector operator * (const dmatrix& M,const df1b2vector& x);
1226 
1228 df1b2matrix operator * (const dmatrix& M,const df1b2matrix& x);
1229 df1b2matrix operator + (const dmatrix& M,const df1b2matrix& x);
1233 df1b2matrix operator + (const df1b2matrix& M,const double x);
1234 df1b2matrix operator * (const df1b2matrix& M,const double x);
1235 
1236 df1b2matrix operator - (const df1b2matrix& M,const dmatrix& x);
1237 df1b2matrix operator - (const df1b2matrix& M,const double x);
1240 df1b2matrix operator - (const dmatrix& M,const df1b2matrix& x);
1242 df1b2matrix operator - (const double, const df1b2matrix& M);
1243 
1245 
1246 df1b2matrix operator + (const double, const df1b2matrix& M);
1247 df1b2matrix operator * (const double, const df1b2matrix& M);
1248 df1b2matrix elem_prod(const df1b2matrix& x,const df1b2matrix& y);
1249 df1b2matrix elem_prod(const dmatrix& x,const df1b2matrix& y);
1250 df1b2matrix elem_prod(const df1b2matrix& x,const dmatrix& y);
1251 df1b2matrix elem_div(const df1b2matrix& x,const df1b2matrix& y);
1252 df1b2matrix elem_div(const dmatrix& x,const df1b2matrix& y);
1253 df1b2matrix elem_div(const df1b2matrix& x,const dmatrix& y);
1254 
1255 df1b2vector elem_prod(const df1b2vector& x,const df1b2vector& y);
1256 df1b2vector elem_prod(const df1b2vector& x,const dvector& y);
1257 df1b2vector elem_prod(const dvector& x,const df1b2vector& y);
1258 df1b2vector elem_div(const df1b2vector& x,const df1b2vector& y);
1259 df1b2vector elem_div(const dvector& x,const df1b2vector& y);
1260 df1b2vector elem_div(const df1b2vector& x,const dvector& y);
1261 
1263 df1b2vector operator + (double x,const df1b2vector& y);
1266 df1b2vector operator + (const dvector& x,const df1b2vector& y);
1267 df1b2vector operator + (const df1b2vector& y,const dvector& x);
1268 
1270 df1b2vector operator - (const dvector& x,const df1b2vector& y);
1274 df1b2vector operator - (const df1b2variable& x,const dvector& y);
1276 df1b2vector operator - (const df1b2vector& x,const dvector& y);
1277 
1278 df1b2vector operator * (const df1b2variable& y,const dvector&);
1279 
1281 df1b2vector operator * (const df1b2vector& x,double y);
1282 
1284 df1b2vector operator / (const double& y,const df1b2vector& x);
1285 
1287 df1b2vector operator / (const df1b2vector& x,double y);
1288 df1b2vector pow(const df1b2vector& x,double y);
1289 df1b2vector pow(const df1b2vector& v,const df1b2variable & x);
1290 df1b2vector pow(const df1b2vector& v,const df1b2vector & x);
1291 df1b2vector pow(const df1b2variable& v,const df1b2vector & x);
1292 df1b2vector pow(df1b2vector const& _x,dvector const& v);
1293 df1b2vector pow(double v,const df1b2vector & x);
1294 df1b2vector pow(const dvector& x, const df1b2vector& a);
1295 df1b2vector pow(const dvector& x, const df1b2variable& a);
1296 
1297 df1b2vector operator / (const dvector& x,const df1b2variable& y);
1298 df1b2vector operator + (const dvector& x,const df1b2variable& y);
1299 df1b2vector operator - (const dvector& x,const df1b2variable& y);
1300 df1b2vector operator * (const dvector& x,const df1b2variable& y);
1301 // **************************************
1302 // **************************************
1303 df1b2variable sum(const df1b2vector& x);
1308 
1313 df1b2variable sum(const df1b2matrix& x);
1316 df1b2vector cube(const df1b2vector& x);
1317 df1b2vector solve(const df1b2matrix& x,const dvector&);
1318 df1b2vector solve(const df1b2matrix& x,const df1b2vector&);
1319 
1320 int size_count(const df1b2matrix& x);
1321 int size_count(const df1b2vector& x);
1322 
1324 
1325 df1b2vector operator * (const dvector& ,const df1b2matrix& );
1327 df1b2vector operator * (const df1b2vector& ,const dmatrix& );
1330 df1b2vector operator * (const df1b2matrix& M,const dvector& x);
1331 void check_shape(const df1b2vector & x,const df1b2vector & y,const char * s);
1332 void check_shape(const df1b2vector & x,const dvector & y,const char * s);
1333 void check_shape(const dvector & x,const df1b2vector & y,const char * s);
1334 void check_shape(const df1b2vector & x,const df1b2matrix & y,const char * s);
1335 
1336 void checkidentiferstring(const char * ids,test_smartlist& list);
1337 
1338 double& value(const df1b2variable& _x);
1339 dvector value(const df1b2vector& _x);
1340 dmatrix value(const df1b2matrix& _x);
1341 
1347 {
1348 public:
1349  static int stddev_scale(const dvector& d,const dvector& x);
1350  static int current_phase;
1351  static int separable_flag;
1357  double scalefactor;
1358 
1359  static void save_varsptr(void);
1360  static double cobjfun;
1361  static void restore_varsptr(void);
1362 #if (defined(__GNUC__) && defined(__i386)) || (defined(_MSC_VER) && defined(_M_IX86))
1363  static imatrix* pointer_table;
1364 #else
1366 #endif
1367  static initial_df1b2params ** varsptr; // this should be a resizeable
1368  static initial_df1b2params ** varsptr_sav; // this should be a resizeable
1369  static int num_initial_df1b2params; // array
1370  static int num_initial_df1b2params_sav; // array
1371  virtual void set_value(const dvector&,const int& ii)=0;
1372  virtual void set_index(int aflag,const int& ii)=0;
1373  static int set_index(void);
1374  virtual void set_value(const init_df1b2vector&,const int& ii,
1375  const df1b2variable&)=0;
1376  static void reset(const init_df1b2vector&,const df1b2variable&);
1377  static void reset_all(const dvector&);
1378  static void reset(const df1b2vector&,const df1b2variable&);
1379  virtual void add_to_list(void);
1380  initial_df1b2params(void);
1382  virtual void sd_scale(const dvector& d,const dvector& x,const int& ii)=0;
1383  double get_scalefactor();
1384  void set_scalefactor(const double);
1385 };
1386 
1388 
1394 {
1395 };
1396 
1402 {
1403 public:
1404  virtual ~df1b2_init_vector() {;}
1405 
1406  virtual void sd_scale(const dvector& d,const dvector& x,const int& ii);
1408  virtual void set_value(const dvector& x,const int& _ii);
1409  virtual void set_value(const init_df1b2vector& x,const int& _ii,
1410  const df1b2variable& pen);
1411  void allocate(int min, int max,int phase_start, const adstring& s="unnamed");
1412  void allocate(int min, int max,const adstring& s="unnamed");
1413  virtual void set_index(int aflag,const int& ii);
1414 };
1415 
1421 {
1422 public:
1423  virtual void sd_scale(const dvector& d,const dvector& x,const int& ii);
1424 
1425  inline void allocate(int rmin,int rmax,const index_type& cmin,
1426  const index_type& cmax,int ps,const char * s)
1427  {
1428  set_phase_start(ps);
1429  df1b2matrix::allocate(rmin,rmax,cmin,cmax,s);
1430  }
1431 
1432  inline void allocate(int rmin,int rmax,const index_type& cmin,
1433  const index_type& cmax,const char * s)
1434  {
1435  df1b2matrix::allocate(rmin,rmax,cmin,cmax,s);
1436  }
1437 
1438  inline void allocate(int rmin,int rmax,int cmin,int cmax)
1439  {
1440  df1b2matrix::allocate(rmin,rmax,cmin,cmax);
1441  }
1442  inline void allocate(int rmin,int rmax,int cmin,int cmax,int ps,
1443  const char * s)
1444  {
1445  set_phase_start(ps);
1446  df1b2matrix::allocate(rmin,rmax,cmin,cmax,s);
1447  }
1448  inline void allocate(int rmin,int rmax,int cmin,int cmax,const char * s)
1449  {
1450  df1b2matrix::allocate(rmin,rmax,cmin,cmax,s);
1451  }
1452  inline void allocate(int rmin, int rmax, int cmin, int cmax, double, double,
1453  const char* s)
1454  {
1455  df1b2matrix::allocate(rmin,rmax,cmin,cmax,s);
1456  }
1458  virtual void set_value(const dvector& x,const int& _ii);
1459  virtual void set_value(const init_df1b2vector& x,const int& _ii,
1460  const df1b2variable& pen);
1461  virtual void set_index(int aflag,const int& ii);
1462 };
1463 
1464 
1470 {
1472 public:
1473  virtual void sd_scale(const dvector& d,const dvector& x,const int& ii);
1474  virtual int & get_ind_index(void) { return ind_index; }
1476  virtual void set_value(const dvector& x,const int& _ii);
1477  virtual void set_value(const init_df1b2vector&,const int& ii,
1478  const df1b2variable&);
1479  virtual void set_index(int aflag,const int& ii);
1480 
1481  void allocate(const adstring&);
1482  void allocate(int,const adstring&);
1484  void operator = (const df1b2variable& _x);
1485 };
1486 
1492 {
1497 
1498 public:
1501 
1502 #if defined(OPT_LIB)
1503  df1b2_init_number& operator [] (int i) { return v[i];}
1504  df1b2_init_number& operator () (int i) { return v[i];}
1505 #else
1508 #endif
1509  void allocate(int min1,int max1,const index_type& phase_start,
1510  const char * s);
1511 
1512  void allocate(int min1,int max1,const char * s);
1513 
1514  int allocated(void) { return (v!=NULL); }
1515  int indexmin(void) {return (index_min);}
1516  int indexmax(void) {return (index_max);}
1517  void deallocate(void);
1518 };
1519 
1521 
1527 {
1528  double minb;
1529  double maxb;
1530 public:
1531  void allocate(double _minb,double _maxb,int _phase_start,
1532  const char * s="UNNAMED");
1533  virtual void sd_scale(const dvector& d,const dvector& x,const int& ii);
1534 
1535  void allocate(double _minb,double _maxb,const char * s="UNNAMED");
1536  //void allocate(const ad_double& _minb,const ad_double& _maxb,
1537  // const char * s="UNNAMED");
1538 
1539  virtual void set_value(const dvector& x,const int& _ii);
1540  virtual void set_value(const init_df1b2vector& x,const int& _ii,
1541  const df1b2variable& pen);
1542 };
1543 
1549 {
1554 public:
1555  //virtual void sd_scale(const dvector& d,const dvector& x,const int& ii);
1557 
1558 #if defined(OPT_LIB)
1561 #else
1564 #endif
1565  void allocate(int min1,int max1, const double_index_type& bmin,
1566  const double_index_type& bmax, const char * s);
1567 
1568  void allocate(int min1,int max1, const double_index_type& bmin,
1569  const double_index_type& bmax, const index_type& phase_start,
1570  const char * s);
1571 
1572 
1573  int allocated(void) { return (v!=NULL); }
1574  int indexmin(void) {return (index_min);}
1575  int indexmax(void) {return (index_max);}
1577  void deallocate(void);
1578 };
1579 
1585 {
1586 protected:
1587  double minb;
1588  double maxb;
1589 public:
1590  virtual void sd_scale(const dvector& d,const dvector& x,const int& ii);
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);
1594  //void allocate(int,int);
1595  virtual void set_value(const dvector& x,const int& _ii);
1596  virtual void set_value(const init_df1b2vector& x,const int& _ii,
1597  const df1b2variable& pen);
1598  inline double getminb(void){return minb;}
1599  inline double getmaxb(void){return maxb;}
1600 };
1601 
1603 
1609 {
1611  int i;
1612 public:
1614  ( re_df1b2_init_bounded_vector * _pv,int _i) : pv(_pv), i(_i) {}
1616  friend class df1b2variable;
1617  virtual void set_value(const init_df1b2vector& x,const int& _ii,
1618  const df1b2variable& pen);
1619 };
1620 
1626 {
1627 public:
1629  {
1630  return random_effects_bounded_vector_info(this,i);
1631  }
1632  virtual void set_value(const init_df1b2vector& x,const int& _ii,
1633  const df1b2variable& pen);
1634  virtual void set_value(const dvector& x,const int& _ii);
1636 };
1637 
1643 {
1644 protected:
1645  double minb;
1646  double maxb;
1647 public:
1648  virtual void sd_scale(const dvector& d,const dvector& x,const int& ii);
1649  void allocate(int,int,int,int,double,double,int,const char *);
1650  void allocate(int,int,const index_type& ,const index_type& ,double,double,int,
1651  const char *);
1652  void allocate(int,int,int,int,double,double,const char *);
1653  void allocate(int,int,const index_type& ,const index_type& ,double,double,
1654  const char *);
1655  void allocate(int,int,int,int,double,double);
1656  //void allocate(int,int);
1657  virtual void set_value(const dvector& x,const int& _ii);
1658  virtual void set_value(const init_df1b2vector& x,const int& _ii,
1659  const df1b2variable& pen);
1660 };
1661 
1667 {
1668 public:
1669  virtual void set_value(const dvector& x,const int& _ii);
1670  virtual void set_value(const init_df1b2vector& x,const int& _ii,
1671  const df1b2variable& pen);
1672 };
1673 
1674 void set_value(const df1b2variable& u,const init_df1b2vector& x,const int& _ii,
1675  double fmin,double fmax,const df1b2variable& fpen);
1676 
1677 void set_value(const df1b2variable& u,const init_df1b2vector& x,const int& _ii,
1678  double fmin,double fmax,const df1b2variable& fpen,double s);
1679 
1680 df1b2variable boundp(const df1b2variable& x, double fmin, double fmax);
1681 df1b2variable boundp(const df1b2variable& x, double fmin, double fmax,
1682  const df1b2variable& _fpen);
1683 df1b2variable boundp(const df1b2variable& x, double fmin, double fmax,
1684  const df1b2variable& _fpen,double s);
1685 
1686  ostream& operator << (const ostream& _os, const df1b2variable& _x);
1687  ostream& operator << (const ostream& _os, const df1b2vector& _x);
1688  ostream& operator << (const ostream& _os, const df1b2matrix& _x);
1689 
1691  {
1692  public:
1694  static double fun_without_pen;
1699  void allocate(void);
1700  void allocate(const char *);
1701  };
1702 
1703 df1b2variable posfun(const df1b2variable&x,const double eps);
1704 df1b2variable posfun2(const df1b2variable&x,const double eps,
1705  const df1b2variable& _pen);
1706 df1b2variable posfun(const df1b2variable&x,const double eps,
1707  const df1b2variable& _pen);
1708 
1714 {
1715  return -double(1.0)*x;
1716 }
1717 
1723 {
1724  return -double(1.0)*x;
1725 }
1726 
1727 df1b2variable gamma_density(const df1b2variable& _x,double r, double mu);
1729  const df1b2variable& _mu);
1730 
1731 df1b2variable log_gamma_density(const df1b2variable& _x,double r, double mu);
1733  const df1b2variable& _mu);
1734 
1735 
1737  const df1b2variable& tau);
1738 
1740 
1741 ostream& operator << (const ostream& ostr,const df1b2variable& z);
1742 ostream& operator << (const ostream& ostr,const df1b2vector& z);
1743 ostream& operator << (const ostream& ostr,const df1b2matrix& z);
1744 ostream& operator << (const ostream& ostr,const df1b2_init_number_vector& z);
1745 ostream& operator << (const ostream& ostr,const init_df1b2vector& z);
1746 ostream& operator << (const ostream& ostr,
1748 
1749 class adkludge1;
1750 
1751 
1757  {
1761  public:
1762  df1b2_header_ptr_vector(int mmin,int mmax);
1764  inline df1b2_header * & operator () (int i) { return *(v+i); }
1765  inline df1b2_header * & operator [] (int i) { return *(v+i); }
1766  int indexmin(void) {return index_min;}
1767  int indexmax(void) {return index_max;}
1768  };
1769 
1775  {
1778  double ** v;
1779  public:
1780  double_ptr_vector(int mmin,int mmax);
1782  inline double * & operator () (int i) { return *(v+i); }
1783  inline double * & operator [] (int i) { return *(v+i); }
1784  int indexmin(void) {return index_min;}
1785  int indexmax(void) {return index_max;}
1786  };
1787 
1788 int active(const df1b2_init_vector& x);
1789 int active(const df1b2_init_number& x);
1790 int active(const df1b2_init_matrix& x);
1791 //int active(const df1b2_init_bounded_vector& x);
1792 
1793 //int active (const df1b2_init_vector &);
1794 //int active(const initial_df1b2params& x);
1795 //int active(const df1b2vector& x);
1796 //int active(const df1b2matrix& x);
1797 
1798 double evaluate_function_quiet(const dvector& x,function_minimizer * pfmin);
1799 double evaluate_function(const dvector& x,function_minimizer * pfmin);
1800 double evaluate_function(double& fval,const dvector& x,
1801  function_minimizer * pfmin);
1802 double evaluate_function(double& fval,const dvector& x,const dvector&,
1803  function_minimizer * pfmin);
1804 
1805 
1807  function_minimizer * pfmin);
1808 
1809 #include <df1b2fnl.h>
1810 
1811 int allocated(const df1b2_init_vector&);
1812 int allocated(const df1b2vector&);
1813 int allocated(const df1b2_init_matrix&);
1814 #include <df3fun.h>
1815 
1816 /*
1817 df1b2variable betai(const df1b2variable & _a, const df1b2variable & _b,
1818  const df1b2variable & _x);
1819 df1b2variable betai(const df1b2variable & _a, const df1b2variable & _b,
1820  double _x);
1821 */
1822 
1823 df1b2variable betai(const df1b2variable& a, const df1b2variable& b, double x, int maxit=100);
1824 df1b2variable pbeta(double x, const df1b2variable& a, const df1b2variable& b, int maxit=100);
1825 df1b2variable pbeta(const df1b2variable& x, const df1b2variable& a, const df1b2variable& b, int maxit=100);
1826 
1831 
1833  const dvector& u0,const dmatrix& Hess,const dvector& _xadjoint,
1834  const dvector& _uadjoint,const dmatrix& _Hessadjoint,
1835  function_minimizer * pmin);
1836 
1838  const dvector& u0,const dmatrix& Hess,const dvector& _xadjoint,
1839  const dvector& _uadjoint,const dmatrix& _Hessadjoint,
1840  function_minimizer * pmin);
1841 
1843  const dvector& u0,const dmatrix& Hess,const dvector& _xadjoint,
1844  const dvector& _uadjoint,const dmatrix& _Hessadjoint,
1845  function_minimizer * pmin);
1846 
1848  const dvector& u0,const dmatrix& Hess,const dvector& _xadjoint,
1849  const dvector& _uadjoint,const dmatrix& _Hessadjoint,
1850  function_minimizer * pmin);
1851 
1853  (const dvector& x,const dvector& u0,const dmatrix& Hess,
1854  const dvector& _xadjoint,const dvector& _uadjoint,
1855  const dmatrix& _Hessadjoint,function_minimizer * pmin);
1856 
1858  const dvector& u0,const dmatrix& Hess,const dvector& _xadjoint,
1859  const dvector& _uadjoint,const dmatrix& _Hessadjoint,
1860  function_minimizer * pmin);
1861 
1862 double calculate_importance_sample(const dvector& x,const dvector& u0,
1863  const dmatrix& Hess,const dvector& _xadjoint,const dvector& _uadjoint,
1864  const dmatrix& _Hessadjoint,function_minimizer * pmin);
1865 
1866 double calculate_importance_sample_shess(const dvector& x,const dvector& u0,
1867  const dmatrix& Hess,const dvector& _xadjoint,const dvector& _uadjoint,
1868  const dmatrix& _Hessadjoint,function_minimizer * pmin);
1869 double calculate_importance_sample(const dvector& x,const dvector& u0,
1870  const banded_symmetric_dmatrix& bHess,const dvector& _xadjoint,
1871  const dvector& _uadjoint,
1872  const banded_symmetric_dmatrix& _bHessadjoint,function_minimizer * pmin);
1873 
1875  function_minimizer * pfmin);
1876 
1882 {
1883 public:
1885  virtual void set_old_style_flag(void)=0;
1886  //style_flag_class(void) {set_old_style_flag();}
1887 };
1888 
1894 {
1899 public:
1900  static int qflag;
1901  static quadratic_prior * ptr[]; // this should be a resizeable array
1902  static void get_M_calculations(void);
1903  static void cleanup_pMinv();
1904  static void cleanup_dfpMinv();
1906  static const int max_num_quadratic_prior;
1907  void add_to_list(void);
1908 public:
1910  int get_offset(int xs);
1911  int get_myindex(void) { return xmyindex;}
1912  static quadratic_prior * get_ptr(int i){ return ptr[i];}
1913  void operator = (const dvar_matrix &);
1914  void operator = (const dmatrix &);
1916  static int get_num_quadratic_prior(void) { return num_quadratic_prior;}
1917  static dvariable get_quadratic_priors(void);
1918  dvariable get_function(void);
1919  quadratic_prior(void);
1920  ~quadratic_prior(void);
1921  void allocate(const dvar_vector & _u,const char * s);
1922  void allocate(const dvar_vector & _u);
1923  void allocate(const dvar_matrix & _M, const dvar_vector & _u,const char * s);
1924  void allocate(const dvar_matrix & _M, const dvar_vector & _u);
1925  //dmatrix get_cHessian(void);
1926  void get_cHessian(dmatrix,int);
1927  void get_cHessian(dvar_matrix,int);
1929  void get_vHessian(dvar_matrix ,int);
1930  void get_cgradient(dvector,int);
1931  dvar_matrix get_Hessian(void);
1932  dvar_vector get_gradient(void);
1935  static void get_cgradient_contribution(dvector,int);
1936  static void get_cHessian_contribution(dmatrix,int);
1937  static void get_vHessian_contribution(dvar_matrix ,int );
1939  friend class df1b2quadratic_prior;
1940  virtual void get_cM(void)=0;
1941 };
1942 
1948 {
1952 public:
1956  static df1b2quadratic_prior * ptr[]; // this should be a resizeable array
1958  static const int max_num_quadratic_prior;
1959  void add_to_list(void);
1960 public:
1961  static df1b2quadratic_prior * get_ptr(int i){ return ptr[i];}
1963  unsigned int get_num_active_parameters(void) { return num_active_parameters; }
1964  int get_myindex(void) { return xmyindex;}
1965  void operator = (const df1b2matrix &);
1966  void operator = (const dmatrix &);
1967  static int get_num_quadratic_prior(void) { return num_quadratic_prior;}
1968  static dvariable get_quadratic_priors(void);
1970  df1b2quadratic_prior(void);
1971  ~df1b2quadratic_prior(void);
1972  void allocate(const df1b2_init_vector & _u,const char * s);
1973  void allocate(const df1b2_init_vector & _u);
1974  void allocate(const df1b2matrix & _M, const df1b2_init_vector & _u,
1975  const char * s);
1976  void allocate(const df1b2matrix & _M, const df1b2_init_vector & _u);
1977  void allocate(const dvar_matrix & _M, const dvar_vector & _u,const char * s);
1978  void allocate(const dvar_matrix & _M, const dvar_vector & _u);
1979  void deallocate() {}
1980  dmatrix get_cHessian(void);
1981  dvector get_cgradient(void);
1982  dvar_matrix get_Hessian(void);
1983  dvar_vector get_gradient(void);
1986  static dvector get_cgradient_contribution(void);
1987  static dmatrix get_cHessian_contribution(void);
1988  static void get_Lxu_contribution(dmatrix&);
1989  virtual void get_Lxu(dmatrix&)=0;
1990  friend class quadratic_prior;
1991  friend class df1b2_parameters;
1992 };
1993 
1999 {
2000  virtual void set_old_style_flag(void);
2001 public:
2002  normal_quadratic_prior(void);
2003  void operator = (const dvar_matrix & M);
2004 };
2005 
2011 {
2012  virtual void set_old_style_flag(void);
2013 public:
2014  void operator = (const df1b2matrix & M);
2016 };
2017 
2023 {
2024  virtual void set_old_style_flag(void);
2025 public:
2026  quadratic_re_penalty(void);
2027  void operator = (const dvar_matrix & M);
2028  void operator = (const dmatrix & M);
2029 };
2030 
2036 {
2037  virtual void set_old_style_flag(void);
2038 public:
2039  void operator = (const df1b2matrix & M);
2040  void operator = (const dmatrix & M);
2042 };
2043 
2045 
2051 {
2052  virtual void set_old_style_flag(void);
2053 public:
2055  void operator = (const dmatrix & M);
2056 };
2057 
2063 {
2064  virtual void set_old_style_flag(void);
2065 public:
2066  void operator = (const dmatrix & M);
2068 };
2069 
2071 
2073  const int& sgn);
2076  const df1b2vector& v);
2077 
2078 //df1b2variable ln_det(df1b2matrix& M);
2079 // line above replaced with line below based on issue #37
2080 df1b2variable ln_det(const df1b2matrix & m1);
2081 
2083 
2084 //df1b2vector solve(df1b2matrix& M,df1b2vector& v);
2085 
2087 
2088 df1b2matrix expm(const df1b2matrix & A);
2089 df1b2matrix solve(const df1b2matrix& aa,const df1b2matrix& tz,
2090  df1b2variable ln_unsigned_det,df1b2variable& sign);
2091 df1b2matrix solve(const df1b2matrix& aa,const df1b2matrix& tz);
2092 df1b2vector solve(const df1b2matrix& aa,const df1b2vector& z,
2093  const df1b2variable& ld, df1b2variable& sign);
2094 
2095 void check_pool_depths();
2096 
2099 df1b2variable bounder(const df1b2variable& x,double min,double max,
2100  double scale);
2101 
2103 
2105 
2111 
2114  double _a);
2115 
2117  const df1b2variable& _b,double eps=1.e-7);
2119  double spread=3.0);
2121  double spread=3.0);
2122 
2125 double inv_cumd_gamma(double y,double _a);
2126 
2129  double eps=1.e-7);
2130 
2136  {
2137  double mult;
2138  double eps;
2140  public:
2141  df1b2function_tweaker(double eps,double mult);
2143  };
2144 
2145 df1b2vector posfun(const df1b2vector& x,double eps,
2146  const df1b2variable& _pen);
2147 
2149  double bound=0.999999);
2150 
2152 
2153  ofstream & operator << (const ofstream& _s,const nested_calls_shape& m);
2154 
2155  df1b2variable log_der_logistic(double a,double b,const df1b2variable& x);
2156  df1b2variable logistic(double a,double b,const df1b2variable& x);
2157  df1b2variable dflogistic(double a,double b,const df1b2variable& x);
2158 
2159  df1b2variable dfposfun(const df1b2variable& x,const double eps);
2160  void ADMB_getcallindex(const df1b2variable& x);
2161  void ADMB_getcallindex(const df1b2vector& x);
2162  void ADMB_getcallindex(const df1b2matrix& x);
2163 
2164 df1b2variable asin(const df1b2variable& xx);
2165 #endif
df1b2matrix(void)
Description not yet available.
Definition: f1b2vc5.cpp:635
init_df1b2vector(void)
Default constructor.
Definition: df1b2fn2.cpp:337
void set_reverse(void)
Definition: df1b2fun.h:714
Description not yet available.
Definition: fvar.hpp:7981
char * bptr
Definition: df1b2fun.h:543
static int num_initial_df1b2params_sav
Definition: df1b2fun.h:1370
void operator=(const dmatrix &M)
Definition: fquadpri.cpp:319
double * get_u_bar_tilde() const
Definition: df1b2fun.h:234
char * buffer
Definition: df1b2fun.h:504
void set_recend()
Definition: df1b2fun.h:699
void read_buffer(void)
Description not yet available.
Definition: df1b2f10.cpp:287
static adpool * pool
Definition: df1b2fun.h:273
double(* d3f222)(double, double)
Definition: df1b2fun.h:443
double factln(double n)
Log-factorial .
Definition: combc.cpp:38
double(* df)(double)
Definition: df1b2fun.h:411
Description not yet available.
Definition: df1b2fun.h:1947
static const int max_num_quadratic_prior
Definition: df1b2fun.h:1958
d3_array tan(const d3_array &arr3)
Returns d3_array results with computed tan from elements in arr3.
Definition: d3arr2a.cpp:73
int indexmin(void)
Definition: df1b2fun.h:1784
void read(const test_smartlist &, void *, int nsize)
double report_usage(void)
Definition: df1b2fun.h:516
void allocate(int rmin, int rmax, int cmin, int cmax, const char *s)
Definition: df1b2fun.h:1448
void get_cHessian_from_vHessian(dmatrix, int)
Description not yet available.
Definition: quadpri.cpp:337
vector_shapex * shape
Definition: df1b2fun.h:1124
void initialize(void)
Description not yet available.
Definition: df1b2f14.cpp:155
void write_buffer(void)
Description not yet available.
Definition: df1b2f14.cpp:270
static void reset(const init_df1b2vector &, const df1b2variable &)
Description not yet available.
Definition: df1b2f15.cpp:51
initial_df1b2params * P_INITIAL_DF1B2PARAMS
Definition: df1b2fun.h:1387
void operator=(const dvar_matrix &M)
Description not yet available.
Definition: quadpri.cpp:898
static void reset_all(const dvector &)
Description not yet available.
Definition: df1b2f18.cpp:17
double log_comb(double n, double k)
Log of the binomial coefficent; i.e log of &#39;n choose k&#39;.
Definition: combc.cpp:27
static void set_yes_derivatives(void)
Definition: df1b2fun.h:761
df1b2_header *& operator[](int i)
Definition: df1b2fun.h:1765
void check_buffer_size(const size_t)
Description not yet available.
Definition: df1b2f10.cpp:185
df1b2_gradlist * f1b2gradlist
Definition: df1b2glo.cpp:49
double(* d3f122)(double, double)
Definition: df1b2fun.h:442
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).
Definition: d3arr2a.cpp:92
initial_df1b2params(void)
Description not yet available.
Definition: df1b2fun.cpp:130
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
Definition: df1b2f25.cpp:55
void set_dependent_variable(const df1b2variable &_x)
Description not yet available.
Definition: df1b2fn2.cpp:699
static adpool * adpool_vector[]
Definition: df1b2fun.h:282
virtual void get_cM(void)=0
int indexmax(void) const
Definition: df1b2fun.h:389
double inv_cumd_t(double n, double u, double eps)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: cinvcumdt.cpp:11
Description not yet available.
Definition: df1b2fun.h:1881
void operator=(const df1b2matrix &M)
Assigns df1v2quadratic_re with values from m.
Definition: fquadpri.cpp:288
int allocated(void)
Definition: df1b2fun.h:1126
dvector lower_triangular_solve(const dmatrix &m, const dvector &v)
Description not yet available.
Definition: dmat37.cpp:170
~df1b2quadratic_prior(void)
Destructor.
Definition: fquadpri.cpp:105
void set_noreadflag(int n)
Definition: df1b2fun.h:559
void read_pass1_1(void)
Description not yet available.
Definition: df1b2f11.cpp:101
Uses polymorphism to get index information from various data types to be used in constructing and all...
Definition: fvar.hpp:7731
df1b2_init_number * v
Definition: df1b2fun.h:1493
void memcpy(test_smartlist &dest, void *source, const size_t nsize)
memcpy for test_smartlist
Definition: df1b2f10.cpp:367
df1b2vector & operator[](int i) const
Definition: df1b2fun.h:1102
static void set_no_derivatives(void)
Definition: df1b2fun.h:760
double * p
Definition: df1b2fun.h:845
static do_naught_kludge do_naught_kludge_a
Definition: df1b2fun.h:1471
Description not yet available.
Definition: adrndeff.h:182
void allocate(void)
Description not yet available.
Definition: df1b2fn5.cpp:126
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.
Definition: df1b2im3.cpp:23
void write_buffer_one_less(void)
Description not yet available.
Definition: df1b2f14.cpp:230
df1b2_init_vector * pu
Definition: df1b2fun.h:1954
fixed_list_entry * recend
Definition: df1b2fun.h:623
double(* d3f222)(double, double)
Definition: df1b2fun.h:479
int eof(void)
Definition: df1b2fun.h:703
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.
Definition: df1b2imp.cpp:23
virtual void add_to_list(void)
Description not yet available.
Definition: df1b2f15.cpp:36
char * true_buffer
Definition: df1b2fun.h:538
static dvar_matrix get_Hessian_contribution(void)
dvector get_cgradient(void)
Description not yet available.
Definition: df1b2fun.h:1608
Description not yet available.
Definition: fvar.hpp:2030
double inv_cumd_exponential(double y)
Description not yet available.
Definition: ccumdexp.cpp:14
Description not yet available.
Definition: df1b2fun.h:2135
~fixed_smartlist()
Destructor.
Definition: df1b2f17.cpp:19
init_df1b2variable * ptr
Definition: df1b2fun.h:379
Description not yet available.
Definition: imatrix.h:69
dvar_matrix * dfpMinv
Definition: df1b2fun.h:1896
char * sbptr
Definition: df1b2fun.h:544
Description not yet available.
Definition: df1b2fun.h:1548
void set_reverse(void)
Definition: df1b2fun.h:646
void read_file(void)
Definition: df1b2f14.cpp:549
fixed_smartlist2(void)
Default constructor.
Definition: df1b2f14.cpp:27
double * u_bar_tilde
Definition: df1b2fun.h:201
df1b2matrix & operator+=(const df1b2matrix &M)
Description not yet available.
Definition: f1b2vc4.cpp:101
df1b2matrix & operator[](int i)
Definition: df1b2fun.h:1178
int pointersize() const
Definition: df1b2fun.h:966
off_t endof_file_ptr
Definition: df1b2fun.h:613
double norm_to_gamma(double v, double alpha, double bound)
Description not yet available.
Definition: cnormgam.cpp:17
dmatrix * pMinv
Definition: df1b2fun.h:1895
void operator++(void)
Description not yet available.
Definition: df1b2f14.cpp:527
virtual void set_old_style_flag(void)
Description not yet available.
Definition: quadpri.cpp:889
void set_backword(void)
Definition: df1b2fun.h:713
int withinbound(int lb, int n, int ub)
Definition: model.cpp:45
int get_offset(void)
Definition: df1b2fun.h:986
Description not yet available.
Definition: df1b2fun.h:1491
void saveposition(void)
Definition: df1b2fun.h:698
static double cobjfun
Definition: df1b2fun.h:1360
static int num_quadratic_prior
Definition: df1b2fun.h:1957
double gammln(double xx)
Log gamma function.
Definition: combc.cpp:52
double_ptr_vector(int mmin, int mmax)
Constructor vector of ad_double_ptr with dimension [mmin to mmax].
Definition: df1b2ptr.cpp:57
double(* d3f112)(double, double)
Definition: df1b2fun.h:477
df1b2matrix choleski_decomp_extra(const df1b2matrix &M)
char AD_allocation_error_message[]
Definition: df1b2fn2.cpp:32
void ADMB_getcallindex(int)
Definition: fvar.hpp:9243
Description not yet available.
Definition: adrndeff.h:80
df1b23array & operator+=(const df1b23array &M)
double * u_bar
Definition: df1b2fun.h:197
init_df1b2variable(double v=0.0)
Description not yet available.
Definition: df1b2fn2.cpp:246
df1b2variable & operator=(const df3_one_variable &v)
Definition: df3fun.cpp:779
double * get_u() const
Definition: df1b2fun.h:228
virtual void set_old_style_flag(void)=0
short int nvar
Definition: df1b2fun.h:83
void write_buffer(void)
Description not yet available.
Definition: df1b2f10.cpp:241
double dfposfun(const double &x, const double eps)
Adjoint code for posfun; possibly not used.
Definition: posfunc.cpp:19
#define N
Definition: rngen.cpp:56
smartlist(unsigned int bufsize, const adstring &filename)
Constructor.
Definition: df1b2fn2.cpp:648
constant_quadratic_re_penalty(void)
Description not yet available.
Definition: quadpri.cpp:916
void operator=(const dmatrix &M)
Description not yet available.
Definition: quadpri.cpp:934
double besselY(double x, int nu)
Definition: cbessel.cpp:304
fixed_smartlist()
Default constructor.
Definition: df1b2f13.cpp:35
virtual ~df1b2variable()
Destructor.
Definition: df1b2fn2.cpp:279
static unsigned int n
Definition: df1b2fun.h:843
void *& vreference
Definition: df1b2fun.h:145
double sumsq(const d3_array &a)
Definition: d3arr2a.cpp:181
Description not yet available.
Definition: df32fun.h:55
dvariable get_function(void)
Description not yet available.
Definition: quadpri.cpp:110
fixed_list_entry * sbptr
Definition: df1b2fun.h:627
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...
Definition: cbetai.cpp:47
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).
Definition: d3arr2a.cpp:152
static void get_Lxu_contribution(dmatrix &)
Definition: fquadpri.cpp:249
dmatrix trans(const dmatrix &m1)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat2.cpp:13
double bounded_cumd_norm(const double x, double beta)
Description not yet available.
Definition: cumdist.cpp:119
~quadratic_prior(void)
Destructor.
Definition: quadpri.cpp:476
dmatrix expm(const dmatrix &A)
Matrix exponential.
int index_max
Definition: df1b2fun.h:1122
#define x
void rewind(void)
Rewind buffer.
Definition: df1b2f13.cpp:120
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: fvar_a59.cpp:13
df1b2_header *& operator()(int i)
Definition: df1b2fun.h:1764
void allocate(int rmin, int rmax, const index_type &cmin, const index_type &cmax, const char *s)
Definition: df1b2fun.h:1432
Vector of double precision numbers.
Definition: dvector.h:50
double inv_cumd_gamma(double y, double a)
Definition: cgamdev.cpp:124
int indexmin(void) const
Definition: df1b2fun.h:1054
~df1b2matrix()
Destructor.
Definition: f1b2vc5.cpp:747
Description not yet available.
Definition: df1b2fun.h:1401
unsigned int get_num_active_parameters(void)
Definition: df1b2fun.h:1963
double *& operator[](int i)
Definition: df1b2fun.h:1783
static const int adpool_stack_size
Definition: df1b2fun.h:281
~df1b23array()
Destructor.
Definition: f1b23d1.cpp:279
df1b2function_tweaker(double eps, double mult)
Description not yet available.
Definition: df1b2tweak.cpp:17
static int allocation_counter
Definition: df1b2fun.h:277
static void save_adpool_pointer(void)
Description not yet available.
Definition: df1b2fun.cpp:40
predf1b2vector(df1b2vector *_p, int _lb, int _ub)
Definition: df1b2fun.h:252
double(* d3f111)(double, double)
Definition: df1b2fun.h:440
Description not yet available.
Definition: df1b2fnl.h:163
re_df1b2_init_bounded_vector * pv
Definition: df1b2fun.h:1610
static void set_minder(int n)
Definition: df1b2fun.h:299
init_df1b2variable & operator()(int i)
Definition: df1b2fun.h:392
double(* d3f112)(double, double)
Definition: df1b2fun.h:441
static int separable_flag
Definition: df1b2fun.h:1351
static void get_cgradient_contribution(dvector, int)
Description not yet available.
Definition: quadpri.cpp:558
df1b2_gradlist * localf1b2gradlist
Definition: df1b2glo.cpp:50
df1b2variable lgamma2(const df1b2variable &_x)
static unsigned int nvar_vector[]
Definition: df1b2fun.h:288
double robust_normal_mixture_deviate(double x, double spread)
Description not yet available.
Definition: cnorlogmix.cpp:130
static void set_blocksize(void)
Description not yet available.
Definition: df1b2fn2.cpp:89
static int passnumber
Definition: df1b2fun.h:289
double * get_u_dot_tilde() const
Definition: df1b2fun.h:233
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)
Definition: df1b2fun.h:434
void print_dot_derivatives(df1b2_header *px, const char *s)
void write(const size_t)
Definition: df1b2f13.cpp:100
void allocate(int rmin, int rmax, const index_type &cmin, const index_type &cmax, int ps, const char *s)
Definition: df1b2fun.h:1425
double besselJ(double x, int nu)
Definition: cbessel.cpp:292
Description not yet available.
Definition: df1b2fun.h:1420
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.
Definition: df1b2fn2.cpp:597
static int noallocate
Definition: df1b2fun.h:294
double sum(const d3_array &darray)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr.cpp:21
void operator-=(int)
Description not yet available.
Definition: df1b2f14.cpp:446
double(* d2f22)(double, double)
Definition: df1b2fun.h:439
double(* d3f111)(double, double)
Definition: df1b2fun.h:476
int index_min
Definition: df1b2fun.h:1121
static re_objective_function_value * pobjfun
Definition: df1b2fun.h:1693
void copy(const df1b2vector &)
Description not yet available.
Definition: f1b2vc1.cpp:791
void set_reverse(void)
Definition: df1b2fun.h:567
~df1b2_init_number_vector()
Destructor.
Definition: df1b2nv1.cpp:264
adstring filename
Definition: df1b2fun.h:509
void allocate(const size_t bufsize, const adstring &filename)
Definition: df1b2f13.cpp:57
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.
Definition: df1b2impspf.cpp:25
double qbeta(double x, double a, double b, double eps)
Description not yet available.
Definition: df1b2fun.h:953
static dmatrix get_cHessian_contribution(void)
int adptr_diff(void *x, void *y)
Definition: df1b2fn2.cpp:110
void restore_end(void)
Restore end.
Definition: df1b2f13.cpp:195
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).
Definition: d3arr2a.cpp:132
df1_one_variable atan(const df1_one_variable &x)
Definition: df11fun.cpp:312
void reset(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: df1b2f13.cpp:22
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).
Definition: d3arr2a.cpp:112
virtual void get_Lxu(dmatrix &)=0
Definition: fquadpri.cpp:34
normal_quadratic_prior(void)
Description not yet available.
Definition: quadpri.cpp:853
void allocate(const size_t bufsize, const adstring &filename)
Description not yet available.
Definition: df1b2f14.cpp:63
~df1b2_header_ptr_vector()
Destructor.
Definition: df1b2ptr.cpp:39
dvector evaluate_function_with_quadprior(const dvector &x, int usize, function_minimizer *pfmin)
Description not yet available.
Definition: quadpri.cpp:45
void allocate(int rmin, int rmax, int cmin, int cmax, int ps, const char *s)
Definition: df1b2fun.h:1442
void operator--(void)
Definition: df1b2f13.cpp:467
d3_array sin(const d3_array &arr3)
Returns d3_array results with computed sin from elements in arr3.
Definition: d3arr2a.cpp:43
df1b2matrix * M
Definition: df1b2fun.h:1950
void operator=(const df1b2variable &_x)
Description not yet available.
Definition: df1b2f15.cpp:303
df1b2_init_number()
Description not yet available.
Definition: df1b2f15.cpp:294
static void get_cHessian_contribution_from_vHessian(dmatrix, int)
Description not yet available.
Definition: quadpri.cpp:668
double(* d3f122)(double, double)
Definition: df1b2fun.h:478
void save_end(void)
Description not yet available.
Definition: df1b2f10.cpp:225
static const int max_num_quadratic_prior
Definition: df1b2fun.h:1906
df1_two_variable fabs(const df1_two_variable &x)
Definition: df12fun.cpp:891
exitptr ad_exit
Definition: gradstrc.cpp:53
void initialize(void)
Description not yet available.
Definition: f1b2vc2.cpp:157
void allocate(void)
Do not allocate, but just initialize class members.
Definition: df1b2fn2.cpp:403
df1b2matrix * v
Definition: df1b2fun.h:1123
int make_sure_df1b2fun_gets_linked
int indexmin(void) const
Definition: df1b2fun.h:969
void save_end(void)
Description not yet available.
Definition: df1b2f14.cpp:214
void initialize(void)
Description not yet available.
Definition: df1b2f10.cpp:171
Description not yet available.
Definition: df1b2fun.h:745
Description not yet available.
Definition: df1b2fun.h:1774
void restoreposition(int offset)
Definition: df1b2fun.h:641
static const int adpool_vectorsize
Definition: df1b2fun.h:278
void set_phase_start(int n)
Definition: df1b2fun.h:1457
char * bptr
Definition: df1b2fun.h:506
d3_array cube(const d3_array &m)
Description not yet available.
Definition: d3arr5.cpp:17
static initial_df1b2params ** varsptr
Definition: df1b2fun.h:1367
dvector lower_triangular_solve_trans(const dmatrix &M, const dvector &y)
Description not yet available.
Definition: dmat37.cpp:140
df1b2variable * getv(void)
Definition: df1b2fun.h:967
dvar_matrix get_Hessian(void)
Description not yet available.
Definition: quadpri.cpp:119
int * true_buffend
Definition: df1b2fun.h:689
static dvar_vector get_gradient_contribution(void)
dvar_vector posfun(const dvar_vector &x, double eps, const prevariable &pen)
Description not yet available.
Definition: fvar_a62.cpp:17
ADMB variable vector.
Definition: fvar.hpp:2172
static init_df1b2variable ** list
Definition: df1b2fun.h:363
virtual void set_old_style_flag(void)
Definition: fquadpri.cpp:279
void add_to_list(void)
Definition: fquadpri.cpp:20
void ncount_checker(int ncount, int ncount_check)
void allocate(void)
Does not allocate, but initialize member variables.
Definition: f1b23d1.cpp:312
df1b2variable & operator()(int i) const
Definition: df1b2fun.h:994
int rowmin(void) const
Definition: df1b2fun.h:1053
void allocate(const size_t bufsize, const adstring &filename)
Description not yet available.
Definition: df1b2f10.cpp:57
int allocated(void)
Definition: df1b2fun.h:1049
~fixed_smartlist2()
Destructor.
Definition: df1b2f17.cpp:46
double * u_tilde
Definition: df1b2fun.h:199
size_t nentries
Definition: df1b2fun.h:678
static unsigned int get_nvar()
Definition: df1b2fun.h:298
const int & get_ind_index() const
Definition: df1b2fun.h:237
Description not yet available.
Definition: df1b2fun.h:1526
df1b2_init_number & operator[](int i)
Definition: df1b2fun.h:1503
df1b2variable & operator()(int i, int j) const
Definition: df1b2fun.h:1098
random_effects_bounded_vector_info operator()(int i)
Definition: df1b2fun.h:1628
void rewind(void)
Definition: df1b2f14.cpp:122
void set_u_dot(void)
Description not yet available.
Definition: df1b2fn2.cpp:158
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.
Definition: df1b2fn2.cpp:486
double gamma_density(double x, double r, double mu)
Gamma probability density function; constant objects.
Definition: cgamdens.cpp:21
static int maxder
Definition: df1b2fun.h:292
void restoreposition(void)
Definition: df1b2fun.h:513
df1b2vector * v
Definition: df1b2fun.h:1046
int write_pass1c(const df1b2variable *px, double y, df1b2variable *pz, df1b2function2c *pf)
double(* f)(double, double)
Definition: df1b2fun.h:470
df1b2variable & operator+=(const df1b2variable &v)
Description not yet available.
Definition: df1b2fn3.cpp:129
Description not yet available.
Definition: df1b2fun.h:2035
double mean(const dvector &vec)
Returns computed mean of vec.
Definition: cranfill.cpp:43
double norm(const d3_array &a)
Return computed norm value of a.
Definition: d3arr2a.cpp:190
size_t bufsize
Definition: df1b2fun.h:628
int indindex
Definition: df1b2fun.h:203
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
Definition: df1b2f24.cpp:208
Description not yet available.
Definition: df1b2fun.h:1584
double(* d2f11)(double, double)
Definition: df1b2fun.h:473
double besselI(double x, int nu)
Definition: cbessel.cpp:267
void deallocate(void)
Description not yet available.
Definition: df1b2nv1.cpp:70
static void cleanup_dfpMinv()
void allocate(const dvar_vector &_u, const char *s)
Description not yet available.
Definition: quadpri.cpp:499
Description not yet available.
Definition: df1b2fun.h:1998
void restoreposition(void)
Definition: df1b2fun.h:560
df1b2variable & operator/=(const df1b2variable &v)
Description not yet available.
Definition: df1b2fun.cpp:443
Description not yet available.
Definition: df1b2fun.h:266
Description not yet available.
Definition: df1b2fun.h:669
Description not yet available.
Definition: admodel.h:271
df1b2matrix & operator=(const df3_one_matrix &)
Definition: df3fun.cpp:741
static void save_varsptr(void)
Description not yet available.
Definition: df1b2fun.cpp:70
double dflogistic(double a, double b, const double &x)
df1_one_matrix choleski_decomp(const df1_one_matrix &MM)
Definition: df11fun.cpp:606
This is a function object for a function of one variable which stores the functions which calculate t...
Definition: df1b2fun.h:407
random_effects_bounded_vector_info(re_df1b2_init_bounded_vector *_pv, int _i)
Definition: df1b2fun.h:1614
dvariable invlogit(dvariable x)
Inverse logit function.
void operator+=(int)
Definition: df1b2f13.cpp:490
char * buffer
Definition: df1b2fun.h:541
ivector sgn(const dvector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dvect24.cpp:11
double inv_cumd_beta_stable(double a, double b, double y, double eps)
char * true_buffend
Definition: df1b2fun.h:539
void reset(void)
Definition: df1b2fun.h:512
int index_min
Definition: df1b2fun.h:1044
dmatrix operator*(const d3_array &t, const dvector &v)
Description not yet available.
Definition: d3arr12.cpp:17
df1b2_header ** v
Definition: df1b2fun.h:1760
Description not yet available.
Definition: adpool.h:59
static int adpool_stack_pointer
Definition: df1b2fun.h:285
static void set_maxder(int n)
Definition: df1b2fun.h:300
mat_shapex * shape
Definition: df1b2fun.h:1047
dvar_vector get_gradient(void)
Description not yet available.
Definition: quadpri.cpp:400
fixed_smartlist nlist
Definition: df1b2fun.h:754
d3_array mfexp(const d3_array &m)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr7.cpp:10
double(* f)(double)
Definition: df1b2fun.h:410
static dvariable get_quadratic_priors(void)
Description not yet available.
Definition: quadpri.cpp:544
Description not yet available.
Definition: fvar.hpp:7500
~init_df1b2vector()
Destructor.
Definition: df1b2fn2.cpp:415
static int current_phase
Definition: df1b2fun.h:1350
void deallocate(void)
If no other copies exist, free df1b2variable::ptr.
Definition: df1b2fn2.cpp:286
double * get_u_dot() const
Definition: df1b2fun.h:229
double * ptr
Definition: df1b2fun.h:269
int write_pass1_pluseq(const df1b2variable *px, df1b2variable *pz)
Description not yet available.
Definition: df1b2fn3.cpp:154
static int adpool_use_index[]
Definition: df1b2fun.h:275
int fp
Definition: df1b2fun.h:510
double(* d2f22)(double, double)
Definition: df1b2fun.h:475
void initialize(void)
Description not yet available.
Definition: df1b2f13.cpp:158
double sfabs(const double v1)
Description not yet available.
Definition: dvect14.cpp:20
double * u_dot_bar_tilde
Definition: df1b2fun.h:202
double evaluate_function(const dvector &x, function_minimizer *pfmin)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: df1b2lap.cpp:2026
double * doubleptr
Definition: df1b2fun.h:620
int write_pass1_minuscv(const df1b2variable *py, df1b2variable *pz)
Definition: df1b2min2.cpp:33
static int num_initial_df1b2params
Definition: df1b2fun.h:1369
unsigned int bufsize
Definition: df1b2fun.h:508
int write_pass1_prod(double x, const df1b2variable *py, df1b2variable *pz)
Description not yet available.
Definition: df1b2prc.cpp:65
dvector solve(const dmatrix &aa, const dvector &z)
Solve a linear system using LU decomposition.
Definition: dmat34.cpp:46
df1b2vector & operator=(const df3_one_vector &)
Definition: df3fun.cpp:760
void operator=(double x)
Description not yet available.
Definition: df1b2fn2.cpp:180
void operator--(void)
Description not yet available.
Definition: df1b2f14.cpp:472
df1b2vector & shift(int)
Description not yet available.
Definition: f1b2vc7.cpp:17
void allocate(int min1, int max1, const double_index_type &bmin, const double_index_type &bmax, const char *s)
Description not yet available.
Definition: df1b2nv1.cpp:89
df1b2variable operator()(const df1b2variable &x)
Description not yet available.
Definition: df1b2fn2.cpp:520
double bounder(double x, double min, double max, double scale)
Description not yet available.
Description not yet available.
Definition: df1b2fun.h:602
~ad_dstar(void)
Description not yet available.
Definition: df1b2fn2.cpp:60
int indexmin(void)
Definition: df1b2fun.h:1129
void reset(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: df1b2f10.cpp:22
Description not yet available.
Definition: df1b2fun.h:2050
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
Definition: df1b2f18.cpp:125
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
Definition: df1b2f25.cpp:85
char * buffend
Definition: df1b2fun.h:542
adstring funname
Definition: df1b2fun.h:444
prnstream & endl(prnstream &)
double * u_dot_bar
Definition: df1b2fun.h:198
void restoreposition(int offset)
Definition: df1b2fun.h:709
double besselK(double x, int nu)
Definition: cbessel.cpp:279
dmatrix get_cHessian(void)
test_smartlist list
Definition: df1b2fun.h:753
void allocate(int rmin, int rmax, int cmin, int cmax)
Definition: df1b2fun.h:1438
Array of integers(int) with indexes from index_min to indexmax.
Definition: ivector.h:50
int max_num_init_df1b2variable
Definition: df1b2fn2.cpp:30
Description not yet available.
Definition: df1b2fun.h:2022
df1b2variable & operator*=(const df1b2variable &v)
Description not yet available.
Definition: df1b2fun.cpp:434
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr2c.cpp:11
void restoreposition(void)
Definition: df1b2fun.h:708
double_index_type * it
Definition: df1b2fun.h:1553
void noallocate(int lib, int ub)
Description not yet available.
Definition: f1b2vc1.cpp:733
re_objective_function_value & operator=(const df1b2variable &v)
Description not yet available.
Definition: df1b2fn2.cpp:905
vector_shapex * shape
Definition: df1b2fun.h:956
~df1b2vector()
Destructor.
Definition: f1b2vc1.cpp:752
void print_derivatives(const adstring &s, double f, double df, double d2f, double d3f, int bflag)
Description not yet available.
Definition: df1b2fn3.cpp:27
void operator++(void)
Description not yet available.
Definition: df1b2f13.cpp:518
void operator=(const df1b2matrix &)
Definition: fquadpri.cpp:149
int write_pass1_minus(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz)
Description not yet available.
Definition: df1b2min.cpp:43
void allocate(void)
Description not yet available.
Definition: df1b2fn2.cpp:926
dmatrix check_second_derivatives(const init_df1b2vector &x)
Description not yet available.
Definition: df1b2fn2.cpp:807
void restore_end(void)
Set to end of file ptr.
Definition: df1b2f14.cpp:192
void set_forward(void)
Definition: df1b2fun.h:712
int index_max
Definition: df1b2fun.h:1045
void set_scalefactor(const double)
Set scale factor for parameter in RE model.
Definition: df1b2f15.cpp:85
dvector rowsum(const dmatrix &matrix)
Returns dvector where each element contains the sum total of each row in matrix.
Definition: dvect12.cpp:61
char * sbptr
Definition: df1b2fun.h:507
ADrfptr pf
Definition: df1b2fun.h:595
~df1b2_init_bounded_number_vector()
Description not yet available.
Definition: df1b2nv1.cpp:61
adstring filename
Definition: df1b2fun.h:546
df1b2variable operator()(const df1b2variable &x, const df1b2variable &y)
Description not yet available.
Definition: df1b2fn2.cpp:552
int get_noreadflag(void)
Definition: df1b2fun.h:638
#define min(a, b)
Definition: cbivnorm.cpp:188
fixed_smartlist2 nlist3
Definition: df1b2fun.h:758
int get_noreadflag(void)
Definition: df1b2fun.h:558
virtual ~df1b2_init_vector()
Definition: df1b2fun.h:1404
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.
Definition: df1b2im5.cpp:24
double * doubleptr
Definition: df1b2fun.h:687
fixed_list_entry * buffer
Definition: df1b2fun.h:624
df1b2variable mult_add(const df1b2variable &x, const df1b2variable &y)
Description not yet available.
Definition: df1b2fun.cpp:749
Description not yet available.
Definition: df33fun.h:53
static int no_derivatives
Definition: df1b2fun.h:759
int written(void)
Definition: df1b2fun.h:730
short int ncopies
Definition: df1b2fun.h:82
double report_usage(void)
Definition: df1b2fun.h:651
void operator=(const dvar_matrix &)
Description not yet available.
Definition: quadpri.cpp:687
Description not yet available.
Definition: df1b2fun.h:1642
Description not yet available.
fixed_smartlist2 nlist2
Definition: df1b2fun.h:756
int * true_buffer
Definition: df1b2fun.h:688
fixed_list_entry * true_buffer
Definition: df1b2fun.h:621
double * doubleptr
Definition: df1b2fun.h:537
int indexmax(void)
Definition: df1b2fun.h:1785
void add_buffer_fringe(int n)
Definition: df1b2fun.h:581
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
Definition: df1b2f25.cpp:107
static int num_variables
Definition: df1b2fun.h:362
dvector first_difference(const dvector &values)
Returns dvector containing the differences of an values(i) and values(i + 1) for i = 1 to values...
Definition: dvec_dif.cpp:17
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
df1b2_init_bounded_number & operator[](int i)
Definition: df1b2fun.h:1559
virtual void set_old_style_flag(void)
Description not yet available.
Definition: quadpri.cpp:862
dvariable inv_cumd_normal_logistic_mixture(const prevariable &_yy, double a)
Definition: cnorlogmix.cpp:87
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
Definition: df1b2f25.cpp:41
int write_pass1_eq(const df1b2variable *px, df1b2variable *pz)
Description not yet available.
Definition: df1b2fn4.cpp:100
double colsum(const dmatrix &m, int col)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat27.cpp:10
void write(const size_t n)
Description not yet available.
Definition: df1b2f10.cpp:106
Description not yet available.
Definition: df1b2fun.h:1756
df1b2variable get_function(void)
df1b2_init_bounded_number_vector()
Default constructor.
Definition: df1b2nv1.cpp:17
double_index_type * it
Definition: df1b2fun.h:1496
dvariable log_der_logistic(double a, double b, const prevariable &x)
Description not yet available.
Definition: logit.cpp:35
void read_buffer(void)
Description not yet available.
Definition: df1b2f13.cpp:332
ad_dstar(void)
Description not yet available.
Definition: df1b2fn2.cpp:685
df1b2_header()
Default constructor.
Definition: df1b2fun.h:209
Description not yet available.
Definition: df32fun.h:188
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
Definition: d3arr2a.cpp:28
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.
Definition: df1b2ghmult.cpp:23
int unallocated(void)
Definition: df1b2fun.h:272
double(* d2f11)(double, double)
Definition: df1b2fun.h:437
test_smartlist(void)
Default constructor.
Definition: df1b2f10.cpp:34
void read_file(void)
Definition: df1b2f13.cpp:540
virtual void set_old_style_flag(void)
Definition: fquadpri.cpp:315
char * recend
Definition: df1b2fun.h:540
df1b2variable mypow(const df1b2variable &x, double y)
Description not yet available.
Definition: df32fun.cpp:1321
#define M
Definition: rngen.cpp:57
df1b2quadratic_prior(void)
Default constructor.
Definition: fquadpri.cpp:92
int mywrite_pass1(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz, mydf1b2function2 *pf)
double(* df2)(double, double)
Definition: df1b2fun.h:436
dmatrix get_hessian(const init_df1b2vector &_x)
Description not yet available.
Definition: df1b2fn2.cpp:713
void operator+=(int)
Description not yet available.
Definition: df1b2f14.cpp:499
dvariable beta(const prevariable &a, const prevariable &b)
Beta density function.
Definition: vbeta.cpp:18
d3_array check_third_derivatives(const init_df1b2vector &x)
Description not yet available.
Definition: df1b2fn2.cpp:834
static int stddev_scale(const dvector &d, const dvector &x)
Description not yet available.
Definition: df1b2f25.cpp:26
df1b2matrix & operator*=(const df1b2variable &x)
Description not yet available.
Definition: f1b2vc4.cpp:85
static dvariable get_quadratic_priors(void)
df1b2matrix & operator-=(const df1b2matrix &M)
Description not yet available.
Definition: f1b2vc4.cpp:127
Description not yet available.
Definition: df1b2fun.h:527
dmatrix outer_prod(const dvector &v1, const dvector &v2)
Description not yet available.
Definition: dmat23.cpp:17
static unsigned int blocksize
Definition: df1b2fun.h:293
void deallocate(void)
Description not yet available.
Definition: f1b2vc5.cpp:766
void set_forward(void)
Definition: df1b2fun.h:644
df1b2_gradlist * globalf1b2gradlist
Definition: df1b2glo.cpp:51
void reallocate(void)
Description not yet available.
Definition: df1b2fn2.cpp:391
Description not yet available.
Definition: df1b2fun.h:1119
double * get_u_dot_bar() const
Definition: df1b2fun.h:231
Description not yet available.
Definition: fvar.hpp:2819
Description not yet available.
Definition: df1b2fun.h:431
static int get_passnumber(void)
Definition: df1b2fun.h:296
virtual void set_value(const init_df1b2vector &x, const int &_ii, const df1b2variable &pen)
Description not yet available.
Definition: df1b2f15.cpp:648
double betai(const double a, const double b, const double x, int maxit)
Incomplete beta function for constant objects.
Definition: cbetai.cpp:21
int write_pass1_minuseq(const df1b2variable *px, df1b2variable *pz)
Description not yet available.
Definition: df1b2fn8.cpp:51
static df1b2quadratic_prior * ptr[]
Definition: df1b2fun.h:1956
static int pool_allocation_number[]
Definition: df1b2fun.h:276
unsigned int num_active_parameters
Definition: df1b2fun.h:1962
void deallocate(void)
If no other copies exists, free allocated memory.
Definition: f1b2vc1.cpp:759
double get_scalefactor()
Description not yet available.
Definition: df1b2f15.cpp:75
void write_buffer(void)
Description not yet available.
Definition: df1b2f13.cpp:286
void set_value(const dvar_matrix &x, const dvar_vector &v, const int &_ii, double s)
Description not yet available.
Definition: set.cpp:235
int get_myindex(void)
Definition: df1b2fun.h:1964
int allocated(void)
Definition: df1b2fun.h:271
double norm2(const d3_array &a)
Return sum of squared elements in a.
Definition: d3arr2a.cpp:167
int eof(void)
Definition: df1b2fun.h:557
void set_phase_start(int n)
Definition: df1b2fun.h:1475
static dvar_matrix get_Hessian_contribution(void)
void operator=(const dvar_matrix &M)
Description not yet available.
Definition: quadpri.cpp:871
void set_phase_start(int n)
Definition: df1b2fun.h:1381
adstring funname
Definition: df1b2fun.h:414
char * buffend
Definition: df1b2fun.h:505
double * get_u_tilde() const
Definition: df1b2fun.h:232
Description not yet available.
Definition: df1b2fun.h:467
df1b2variable operator()(const df1b2variable &x, const df1b2variable &y)
double robust_normal_logistic_mixture_deviate(double x, double spread)
Description not yet available.
Definition: cnorlogmix.cpp:118
int write_pass1_initialize(df1b2variable *pz)
Description not yet available.
Definition: df1b2fn5.cpp:187
init_df1b2variable * trueptr
Definition: df1b2fun.h:378
double ln_det(const dmatrix &m1, int &sgn)
Compute log determinant of a constant matrix.
Definition: dmat3.cpp:536
df1b2_init_bounded_number & operator()(int i)
Definition: df1b2fun.h:1560
double(* d2f12)(double, double)
Definition: df1b2fun.h:474
df1b2_header_ptr_vector(int mmin, int mmax)
Constructor vector of ad_df1b2_header_ptr with dimension [mmin to mmax].
Definition: df1b2ptr.cpp:23
void check_shape(const df1b2vector &x, const df1b2vector &y, const char *s)
Description not yet available.
Definition: f1b2vc5.cpp:30
void(** ADprfptr)(void)
Definition: df1b2fun.cpp:138
Description not yet available.
Definition: df1b2fun.h:1666
double(* df1)(double, double)
Definition: df1b2fun.h:471
double(* d2f12)(double, double)
Definition: df1b2fun.h:438
int write_pass1(const df1b2variable *px, const df1b2variable *py, df1b2variable *pz, df1b2function2 *pf)
Description not yet available.
Definition: df1b2f12.cpp:17
void get_cHessian(dmatrix, int)
Description not yet available.
Definition: quadpri.cpp:140
int written(void)
Definition: df1b2fun.h:662
void reset(void)
Definition: df1b2fun.h:702
static void get_vHessian_contribution(dvar_matrix, int)
Description not yet available.
Definition: quadpri.cpp:635
friend class xf_df1b2vector
Definition: df1b2fun.h:1032
static dvar_vector get_gradient_contribution(void)
Description not yet available.
Definition: df1b2fnl.h:115
static void set_nvar(unsigned int n)
Definition: df1b2fun.h:297
double * get_u_dot_bar_tilde() const
Definition: df1b2fun.h:235
df1b2variable & operator[](int i) const
Definition: df1b2fun.h:998
static int num_quadratic_prior
Definition: df1b2fun.h:1905
re_objective_function_value(void)
Description not yet available.
Definition: df1b2fn2.cpp:886
test_smartlist list3
Definition: df1b2fun.h:757
double lower_triangular_ln_det(const dmatrix &m)
Holds &quot;shape&quot; information for vector objects.
Definition: vector_shapex.h:46
df1b2vector(void)
Default constructor.
Definition: f1b2vc1.cpp:620
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.
Definition: d3arr2a.cpp:58
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].
Definition: df1b2nv1.cpp:306
fixed_list_entry * buffend
Definition: df1b2fun.h:625
dvar_vector get_gradient(void)
static void allocate(const unsigned int _n)
Definition: df1b2fn2.cpp:676
int indexmax(void)
Definition: df1b2fun.h:1130
double(* d2f)(double)
Definition: df1b2fun.h:412
void initialize(void)
Initialize.
Definition: df1b2fn2.cpp:129
void print_is_diagnostics(laplace_approximation_calculator *lapprox)
Definition: xmodelm3.cpp:880
Description not yet available.
Definition: df1b2fun.h:373
df1b2vector & operator/=(const df1b2vector &x)
Description not yet available.
Definition: f1b2vc1.cpp:426
quadratic_re_penalty(void)
Description not yet available.
Definition: quadpri.cpp:880
ostream & operator<<(const ostream &_s, preshowpoint p)
Description not yet available.
Definition: admanip.cpp:48
void operator+=(const int)
Description not yet available.
Definition: df1b2f10.cpp:422
void add_to_list(void)
Description not yet available.
Definition: quadpri.cpp:90
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.
Definition: df1b2gh.cpp:23
double report_usage(void)
Definition: df1b2fun.h:719
Description not yet available.
Definition: df1b2fun.h:1042
re_df1b2_init_bounded_vector(void)
Description not yet available.
Definition: df1b2f15.cpp:629
Description not yet available.
Definition: df1b2fun.h:2062
df1b2variable(const do_naught_kludge &)
Definition: df1b2fun.h:309
virtual void set_value(const init_df1b2vector &x, const int &_ii, const df1b2variable &pen)
Description not yet available.
Definition: df1b2f15.cpp:767
static df1b2quadratic_prior * get_ptr(int i)
Definition: df1b2fun.h:1961
void set_recend()
Definition: df1b2fun.h:553
size_t bufsize
Definition: df1b2fun.h:545
static unsigned int get_blocksize(void)
Description not yet available.
Definition: df1b2fn2.cpp:70
void restoreposition(int offset)
Definition: df1b2fun.h:561
static int have_bounded_random_effects
Definition: df1b2fun.h:1353
Description not yet available.
Definition: df1b2fun.h:501
void check_buffer_size(const size_t)
Description not yet available.
Definition: df1b2f13.cpp:173
static unsigned int nvar
Definition: df1b2fun.h:290
void set_value(const dvector &)
Description not yet available.
Definition: df1b2fn2.cpp:318
df1b23array & operator=(const df1b23array &)
void operator-=(const int)
Description not yet available.
Definition: df1b2f10.cpp:396
df1b2vector & operator++(void)
Definition: df1b2fun.h:962
dvar_vector * pu
Definition: df1b2fun.h:1897
int active(const initial_params &ip)
Definition: model.cpp:437
Class definition of matrix with derivitive information .
Definition: fvar.hpp:2480
void set_phase_start(int n)
Definition: df1b2fun.h:1407
Description not yet available.
Definition: df1b2fun.h:840
df1b2_init_number_vector()
Default constructor.
Definition: df1b2nv1.cpp:254
void get_cgradient(dvector, int)
Description not yet available.
Definition: quadpri.cpp:409
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
Definition: df1b2f25.cpp:173
void(* ADrfptr)(void)
Definition: df1b2fun.cpp:139
Description not yet available.
Definition: df1b2fun.h:1893
double inv_cumd_cauchy(const double &x)
Description not yet available.
Definition: cumd_cau.cpp:49
double eps
Definition: ftweak.cpp:13
void get_vHessian(dvar_matrix, int)
Description not yet available.
Definition: quadpri.cpp:262
void write_buffer_one_less(void)
Description not yet available.
Definition: df1b2f13.cpp:236
Description not yet available.
Definition: df1b2fun.h:928
int write_pass1x(const df1b2variable *_px, df1b2variable *pz, df1b2function1 *pf)
Description not yet available.
Definition: df1b2f27.cpp:30
Description not yet available.
Definition: df1b2fun.h:79
Description not yet available.
Definition: adrndeff.h:150
Description not yet available.
Definition: df32fun.h:141
int indexmax(void) const
Definition: df1b2fun.h:970
df1b2vector & operator*=(const df1b2vector &x)
Description not yet available.
Definition: f1b2vc1.cpp:407
static int minder
Definition: df1b2fun.h:291
~re_objective_function_value()
Description not yet available.
Definition: df1b2fn2.cpp:895
double * u_dot_tilde
Definition: df1b2fun.h:200
int eof(void)
Definition: df1b2fun.h:636
virtual int & get_ind_index(void)
Definition: df1b2fun.h:1474
df1b2vector * p
Definition: df1b2fun.h:249
Description not yet available.
Definition: df1b2fun.h:1469
static int get_in_qp_calculations()
Definition: df1b2fun.h:1915
int indexmax(void) const
Definition: df1b2fun.h:1055
double evaluate_function_quiet(const dvector &x, function_minimizer *pfmin)
Description not yet available.
Definition: df1b2lap.cpp:2137
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.
Definition: dsize.cpp:17
static quadratic_prior * ptr[]
Definition: df1b2fun.h:1901
dvariable boundp(const prevariable &x, double fmin, double fmax, const prevariable &_fpen, double s)
Compute penalty for exceeding bounds on parameter; variable ojbects.
Definition: boundfun.cpp:89
double cumd_exponential(double x)
Description not yet available.
Definition: ccumdexp.cpp:26
static int set_index(void)
Definition: df1b2f15.cpp:90
Base class for df1b2variable.
Definition: df1b2fun.h:191
Description not yet available.
Definition: df1b2fun.h:591
init_df1b2variable & operator[](int i)
Definition: df1b2fun.h:393
int & get_ind_index()
Definition: df1b2fun.h:236
adpool * ptr
Definition: df1b2fun.h:87
void write(const size_t n)
Definition: df1b2f14.cpp:104
void read_buffer(void)
Read buffer.
Definition: df1b2f14.cpp:310
void allocate(int rmin, int rmax, int cmin, int cmax, double, double, const char *s)
Definition: df1b2fun.h:1452
fixed_list_entry * true_buffend
Definition: df1b2fun.h:622
Description not yet available.
Definition: admodel.h:1850
static void increment_adpool_counter(void)
Description not yet available.
Definition: df1b2glo.cpp:24
double sign(const double x)
The sign of a number.
Definition: gaussher.cpp:25
static int qflag
Definition: df1b2fun.h:1900
void deallocate(void)
Similar to destructor.
Definition: df1b2fn2.cpp:436
df1b2variable(void)
Default constructor.
Definition: df1b2fn5.cpp:81
fixed_list_entry * bptr
Definition: df1b2fun.h:626
df1b2variable * v
Definition: df1b2fun.h:955
~double_ptr_vector()
Destructor.
Definition: df1b2ptr.cpp:73
static unsigned int adpool_nvar_stack[]
Definition: df1b2fun.h:284
unsigned int size() const
Definition: df1b2fun.h:1131
int colsize(void) const
Definition: df1b2fun.h:1091
void checkidentiferstring(const char *ids, test_smartlist &list)
Description not yet available.
Definition: df1b2fn5.cpp:256
Description not yet available.
Definition: df1b2fun.h:357
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
Definition: d3arr2b.cpp:14
int get_myindex(void)
Definition: df1b2fun.h:1911
dvector column(const dmatrix &matrix, int j)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: dmat6.cpp:13
df1b2_init_bounded_number * v
Definition: df1b2fun.h:1550
double *& operator()(int i)
Definition: df1b2fun.h:1782
short int * ncopies
Definition: df1b2fun.h:304
void save_end(void)
Description not yet available.
Definition: df1b2f13.cpp:220
static void get_cHessian_contribution(dmatrix, int)
Description not yet available.
Definition: quadpri.cpp:591
void restoreposition(void)
Definition: df1b2fun.h:640
df1b2function1(double(*_f)(double), double(*_df)(double), double(*d2f)(double), double(*_d3f)(double), const adstring &s="unnamed")
Description not yet available.
Definition: df1b2fn2.cpp:46
void initialize(void)
Description not yet available.
Definition: f1b2vc3.cpp:287
void read_pass1_2(void)
Description not yet available.
Definition: df1b2f11.cpp:229
void operator=(const df1b2matrix &M)
Assigns normal_df1b2quadratic_prior with values from m.
Definition: fquadpri.cpp:275
void set_backword(void)
Definition: df1b2fun.h:566
static lmatrix * pointer_table
Definition: df1b2fun.h:1365
Description not yet available.
Definition: df1b2fun.h:1346
adstring filename
Definition: df1b2fun.h:696
double(* df2)(double, double)
Definition: df1b2fun.h:472
static initial_df1b2params ** varsptr_sav
Definition: df1b2fun.h:1368
static int get_num_quadratic_prior(void)
Definition: df1b2fun.h:1967
df1b2variable operator()(const df1b2variable &)
Description not yet available.
Definition: df1b2tweak.cpp:51
double log_density_poisson(double x, double mu)
Log Poisson density; constant objects.
Definition: cnegbin.cpp:61
dvector value(const df1_one_vector &v)
Definition: df11fun.cpp:69
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.
Definition: df1b2im3f.cpp:23
Stores integer.
Definition: fvar.hpp:7654
double * u
Definition: df1b2fun.h:195
friend class df1b2variable
Definition: df1b2fun.h:1031
void set_forward(void)
Definition: df1b2fun.h:565
Description not yet available.
Definition: df1b2fun.h:247
int write_pass1_minusvc(const df1b2variable *py, df1b2variable *pz)
Definition: df1b2min3.cpp:33
#define max(a, b)
Definition: cbivnorm.cpp:189
int colmin(void) const
Definition: df1b2fun.h:1089
void deallocate(void)
Description not yet available.
Definition: df1b2nv1.cpp:273
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
Definition: df1b2f18.cpp:46
double(* df1)(double, double)
Definition: df1b2fun.h:435
int get_offset(int xs)
Description not yet available.
Definition: quadpri.cpp:128
double * get_u_bar() const
Definition: df1b2fun.h:230
Description not yet available.
Definition: fvar.hpp:3727
void set_backword(void)
Definition: df1b2fun.h:645
int get_noreadflag(void)
Definition: df1b2fun.h:706
~test_smartlist()
Destructor.
Definition: df1b2f10.cpp:448
dvariable posfun2(const dvariable &x, const double eps, const prevariable &pen)
Retuns a positive function of the argument and sets a penalty for .
Definition: posfunv.cpp:88
void operator-=(int)
Definition: df1b2f13.cpp:446
void colfill(const int j, const df1b2vector &v)
Copy vector values into column j of df1b2matrix.
Definition: f1b2vc5.cpp:795
quadratic_prior(void)
Default constructor.
Definition: quadpri.cpp:465
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
Definition: df1b2f18.cpp:136
void set_recend()
Definition: df1b2fun.h:632
void add_buffer_fringe(int n)
Definition: df1b2fun.h:729
void check_pool_depths(void)
Description not yet available.
Definition: df1b2fnl.cpp:93
double cumd_norm(const double &x)
Culative normal distribution; constant objects.
Definition: cumdist.cpp:90
void initialize(void)
Description not yet available.
Definition: f1b23d1.cpp:406
void allocate(void)
Description not yet available.
Definition: f1b2vc5.cpp:781
static dvector get_cgradient_contribution(void)
double beta_deviate(double a, double b, double x, double eps)
Description not yet available.
Definition: cbetdev.cpp:14
static int adpool_counter
Definition: df1b2fun.h:279
int colmax(void) const
Definition: df1b2fun.h:1090
Description not yet available.
Definition: df1b2fun.h:1625
static adpool * adpool_stack[]
Definition: df1b2fun.h:283
int indexmin(void) const
Definition: df1b2fun.h:388
double(* d3f)(double)
Definition: df1b2fun.h:413
unsigned int size() const
Definition: df1b2fun.h:1057
static quadratic_prior * get_ptr(int i)
Definition: df1b2fun.h:1912
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
Definition: df1b2f18.cpp:30
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)=0
df1b2vector & operator--(void)
Definition: df1b2fun.h:958
static int get_num_quadratic_prior(void)
Definition: df1b2fun.h:1916
int allocated(void)
Definition: df1b2fun.h:968
static double fun_without_pen
Definition: df1b2fun.h:1694
df1b2_init_number & operator()(int i)
Definition: df1b2fun.h:1504
double log_negbinomial_density(double x, double mu, double tau)
size_t nentries
Definition: df1b2fun.h:611
void set_noreadflag(int n)
Definition: df1b2fun.h:639
int written_flag
Definition: df1b2fun.h:531
df1b2variable & operator-=(const df1b2variable &v)
Description not yet available.
Definition: df1b2fn8.cpp:25
int write_save_pass2_tilde_values(const df1b2variable *px)
Description not yet available.
Definition: df1b2fn7.cpp:32
int rowmax(void) const
Definition: df1b2fun.h:1056
int numbytes
Definition: df1b2fun.h:594
void saveposition(void)
Definition: df1b2fun.h:511
int write_pass1_sum(double x, const df1b2variable *py, df1b2variable *pz)
Description not yet available.
Definition: df1b2sumc.cpp:41
dvar_matrix get_Hessian(void)
int written(void)
Definition: df1b2fun.h:582
void check_buffer_size(const size_t)
Description not yet available.
Definition: df1b2f14.cpp:170
static void restore_varsptr(void)
Description not yet available.
Definition: df1b2fun.cpp:90
void deallocate(void)
Deallocates class memory memory.
Definition: f1b23d1.cpp:296
int get_index(void)
Definition: df1b2fun.h:361
Description not yet available.
double report_usage(void)
Definition: df1b2fun.h:572
void saveposition(void)
Definition: df1b2fun.h:552
double inv_cumd_normal_mixture(double yy, double a)
Description not yet available.
Definition: cnormmix.cpp:90
double evaluate_function_no_derivatives(const dvector &x, function_minimizer *pfmin)
Description not yet available.
Definition: df1b2lap.cpp:2196
void allocate(void)
Initialize df1b2vector to empty.
Definition: f1b2vc1.cpp:627
void reset(void)
Description not yet available.
Definition: df1b2fn2.cpp:581
Description not yet available.
Definition: df1b2fun.h:2010
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.
Definition: df1b2im4.cpp:23
test_smartlist list2
Definition: df1b2fun.h:755
double square(const double value)
Return square of value; constant object.
Definition: d3arr4.cpp:16
df1b23array(void)
Description not yet available.
Definition: f1b23d1.cpp:66
Description not yet available.
Definition: fvar.hpp:8564
Fundamental data type for reverse mode automatic differentiation.
Definition: fvar.hpp:1518
double * u_dot
Definition: df1b2fun.h:196
df1_one_variable inv(const df1_one_variable &x)
Definition: df11fun.cpp:384
virtual void set_old_style_flag(void)
Description not yet available.
Definition: quadpri.cpp:925
void restore_end(void)
Description not yet available.
Definition: df1b2f10.cpp:209
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr2a.cpp:13
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
Definition: df1b2f18.cpp:84
virtual void set_old_style_flag(void)
Definition: fquadpri.cpp:266
Description not yet available.
Definition: df1b2fun.h:1393
df1b2vector & operator-=(const df1b2vector &x)
Description not yet available.
Definition: f1b2vc1.cpp:302
df1b2variable div(const df1b2variable &x, const df1b2variable &y)
Description not yet available.
Definition: df32fun.cpp:1282
void df1b2_gradcalc1(void)
Description not yet available.
Definition: df1b2fun.cpp:145
double fourth(const double m)
Fourth power of a number; constant objects.
Definition: dvector.cpp:704
off_t endof_file_ptr
Definition: df1b2fun.h:680
df1b2vector & operator+=(const df1b2vector &x)
Description not yet available.
Definition: f1b2vc1.cpp:264
double log_gamma_density(double x, double r, double mu)
Log gamma probability density function; constant objects.
Definition: cgamdens.cpp:35
adstring filename
Definition: df1b2fun.h:629
void restoreposition(int offset)
Definition: df1b2fun.h:514
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)
Description not yet available.
Definition: df1b2f25.cpp:137
static void restore_adpool_pointer(void)
Description not yet available.
Definition: df1b2fun.cpp:55
static int current_allocation_index
Definition: df1b2fun.h:274
int size()
Definition: df1b2fun.h:971
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
Definition: df1b2f18.cpp:148
d3_array pow(const d3_array &m, int e)
Description not yet available.
Definition: d3arr6.cpp:17
void allocate(const df1b2_init_vector &_u, const char *s)
Definition: fquadpri.cpp:129
df1b2_gradlist ** f1b2gradlist_stack
void rewind(void)
Description not yet available.
Definition: df1b2f10.cpp:127
static int separable_calculation_type
Definition: df1b2fun.h:1352
static void get_M_calculations(void)
Description not yet available.
Definition: quadpri.cpp:30
void add_buffer_fringe(int n)
Definition: df1b2fun.h:661
double gamma_deviate(double _x, double _a)
friend class random_effects_bounded_vector_info
Definition: df1b2fun.h:1030
dvector asin(const dvector &vec)
Returns dvector with principal value of the arc sine of vec, expressed in radians.
Definition: dvect6.cpp:229
int get_local_nvar(void) const
Definition: df1b2fun.h:270
friend class df1b2_parameters
Definition: df1b2fun.h:1991
size_t bufsize
Definition: df1b2fun.h:695
df1b2variable & operator()(int i, int j, int k)
Definition: df1b2fun.h:1175
df1b2matrix & operator/=(const df1b2variable &x)
Description not yet available.
Definition: f1b2vc4.cpp:69
void saveposition(void)
Definition: df1b2fun.h:631
void set_noreadflag(int n)
Definition: df1b2fun.h:707
virtual void set_value(const dvector &, const int &ii)=0
static int in_qp_calculations
Definition: df1b2fun.h:1909