ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fvar_a29.cpp
Go to the documentation of this file.
1 
8 #include "fvar.hpp"
9 
10 /*
11 // "template" for precompiled derivative code
12  // change XXX to function name and YYY to derivative function name
13 void DF_dvXXX(void);
14 dvar_vector XXX(const dvar_vector& v1)
15 {
16  //dvector cv1=value(v1);
17  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
18  for (int i=v1.indexmin();i<=v1.indexmax();i++)
19  {
20  vtmp.elem_value(i)=XXX(v1.elem_value(i));
21  }
22 
23  gradient_structure* gs = gradient_structure::get();
24  DF_FILE* fp = gs->fp;
25 
26  save_identifier_string("ddd");
27  fp->save_dvar_vector_value(v1);
28  fp->save_dvar_vector_position(v1);
29  fp->save_dvar_vector_position(vtmp);
30  save_identifier_string("eee");
31  gs->GRAD_STACK1->set_gradient_stack(DF_dvXXX);
32  return vtmp;
33 }
34 
35 void DF_dvXXX(void)
36 {
37  gradient_structure* gs = gradient_structure::get();
38  DF_FILE* fp = gs->fp;
39 
40  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
41  verify_identifier_string("eee");
42  dvar_vector_position tmp_pos=fp->restore_dvar_vector_position();
43  dvector dfvtmp=restore_dvar_vector_derivatives(tmp_pos);
44  dvar_vector_position v1pos=fp->restore_dvar_vector_position();
45  dvector v1=restore_dvar_vector_value(v1pos);
46  verify_identifier_string("ddd");
47  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
48  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
49  {
50  //vtmp.elem(i)=sin(value(v1.elem(i))));
51  dfv1(i)=dfvtmp(i)*YYY(v1.elem(i));
52  }
53  dfv1.save_dvector_derivatives(v1pos);
54  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
55 }
56 
57 */
58 
59 
60 void DF_dvsin(void);
61 
68 {
69  //dvector cv1=value(v1);
70  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
71  for (int i=v1.indexmin();i<=v1.indexmax();i++)
72  {
73  vtmp.elem_value(i)=sin(v1.elem_value(i));
74  }
75 
79  fp->save_dvar_vector_value(v1);
81  fp->save_dvar_vector_position(vtmp);
83  GRAD_STACK1->set_gradient_stack(DF_dvsin);
84 
85  return vtmp;
86 }
90 void DF_dvsin(void)
91 {
93 
94  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
101  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
102  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
103  {
104  //vtmp.elem(i)=sin(value(v1.elem(i))));
105  dfv1(i)=dfvtmp(i)*cos(v1.elem(i));
106  }
107  dfv1.save_dvector_derivatives(v1pos);
108  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
109 }
110 
111 void DF_dvexp(void);
112 
118 {
119  int min = v1.indexmin();
120  int max = v1.indexmax();
121  //dvector cv1=value(v1);
122  dvar_vector vtmp(min, max);
123  double_and_int* pvtmp = vtmp.va + min;
124  double_and_int* pv1 = v1.va + min;
125  for (int i = min; i <= max; ++i)
126  {
127  pvtmp->x = exp(pv1->x);
128  ++pvtmp;
129  ++pv1;
130  }
131 
134  save_identifier_string("ddd");
136  fp->save_dvar_vector_value(vtmp);
137  fp->save_dvar_vector_position(vtmp);
138  save_identifier_string("hee");
139  GRAD_STACK1->set_gradient_stack(DF_dvexp);
140 
141  return vtmp;
142 }
143 
148 void DF_dvexp(void)
149 {
151 
152  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
156  dvector vtmp=restore_dvar_vector_value(tmp_pos);
159  int min = dfvtmp.indexmin();
160  int max = dfvtmp.indexmax();
161  dvector dfv1(min, max);
162  double* pdfv1 = dfv1.get_v() + min;
163  double* pvtmp = vtmp.get_v() + min;
164  double* pdfvtmp = dfvtmp.get_v() + min;
165  for (int i = min; i <= max; ++i)
166  {
167  //vtmp.elem(i)=sin(value(v1.elem(i))));
168  *pdfv1 = *pdfvtmp * *pvtmp;
169  ++pdfv1;
170  ++pvtmp;
171  ++pdfvtmp;
172  }
173  dfv1.save_dvector_derivatives(v1pos);
174  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
175 }
176 
177 
178 void DF_dvcos(void);
179 
185 {
186  //dvector cv1=value(v1);
187  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
188  for (int i=v1.indexmin();i<=v1.indexmax();i++)
189  {
190  vtmp.elem_value(i)=cos(v1.elem_value(i));
191  }
192 
195  save_identifier_string("ddd");
196  fp->save_dvar_vector_value(v1);
198  fp->save_dvar_vector_position(vtmp);
199  save_identifier_string("cee");
200  GRAD_STACK1->set_gradient_stack(DF_dvcos);
201 
202  return vtmp;
203 }
204 
209 void DF_dvcos(void)
210 {
212 
213  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
220  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
221  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
222  {
223  //vtmp.elem(i)=sin(value(v1.elem(i))));
224  dfv1(i)=-dfvtmp(i)*sin(v1.elem(i));
225  }
226  dfv1.save_dvector_derivatives(v1pos);
227  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
228 }
229 
230 void DF_dvlog(void);
231 
237 {
238  //dvector cv1=value(v1);
239  int min = v1.indexmin();
240  int max = v1.indexmax();
241  dvar_vector vtmp(min, max);
242  double_and_int* pvtmp = vtmp.va + min;
243  double_and_int* pv1 = v1.va + min;
244  for (int i = min; i <= max; ++i)
245  {
246  pvtmp->x = log(pv1->x);
247  ++pvtmp;
248  ++pv1;
249  }
250 
253  save_identifier_string("cdd");
254  fp->save_dvar_vector_value(v1);
256  fp->save_dvar_vector_position(vtmp);
257  save_identifier_string("eee");
258  GRAD_STACK1->set_gradient_stack(DF_dvlog);
259 
260  return vtmp;
261 }
262 
263 #ifdef DEBUG
264 int ad_debug_arithmetic=1;
265 #endif
266 
271 void DF_dvlog(void)
272 {
274 
275  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
282 
283  int min = dfvtmp.indexmin();
284  int max = dfvtmp.indexmax();
285  dvector dfv1(min, max);
286  double* pdfv1 = dfv1.get_v() + min;
287  double* pv1 = v1.get_v() + min;
288  double* pdfvtmp = dfvtmp.get_v() + min;
289  for (int i = min; i <= max; ++i)
290  {
291 #ifdef DEBUG
292  if (ad_debug_arithmetic==1)
293  if (v1.elem(i)==0.0 || fabs(v1.elem(i))<1.e-150 ||
294  dfvtmp(i) > 1.e+150)
295  {
296  cerr << "Possible overflow in DF_dvlog" << endl;
297  }
298 #endif
299  *pdfv1 = *pdfvtmp / *pv1;
300  ++pdfv1;
301  ++pv1;
302  ++pdfvtmp;
303  }
304  dfv1.save_dvector_derivatives(v1pos);
305  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
306 }
307 
308 void DF_dvtan(void);
309 
316 {
317  //dvector cv1=value(v1);
318  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
319  for (int i=v1.indexmin();i<=v1.indexmax();i++)
320  {
321  vtmp.elem_value(i)=tan(v1.elem_value(i));
322  }
323 
326  save_identifier_string("ddd");
327  fp->save_dvar_vector_value(v1);
329  fp->save_dvar_vector_position(vtmp);
330  save_identifier_string("xee");
331  GRAD_STACK1-> set_gradient_stack(DF_dvtan);
332 
333  return vtmp;
334 }
338 void DF_dvtan(void)
339 {
341 
342  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
349  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
350  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
351  {
352  //vtmp.elem(i)=tan(value(v1.elem(i))));
353  dfv1(i)=dfvtmp(i)/pow(cos(v1.elem(i)),2);
354  }
355  dfv1.save_dvector_derivatives(v1pos);
356  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
357 }
358 
359 void DF_dvatan(void);
360 
367 {
368  //dvector cv1=value(v1);
369  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
370  for (int i=v1.indexmin();i<=v1.indexmax();i++)
371  {
372  vtmp.elem_value(i)=atan(v1.elem_value(i));
373  }
374 
377  save_identifier_string("udd");
378  fp->save_dvar_vector_value(v1);
380  fp->save_dvar_vector_position(vtmp);
381  save_identifier_string("eee");
382  GRAD_STACK1->set_gradient_stack(DF_dvatan);
383 
384  return vtmp;
385 }
389 void DF_dvatan(void)
390 {
392 
393  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
400  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
401  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
402  {
403  //vtmp.elem(i)=sin(value(v1.elem(i))));
404  dfv1(i)=dfvtmp(i)/(1.+pow(v1.elem(i),2));
405  }
406  dfv1.save_dvector_derivatives(v1pos);
407  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
408 }
409 
410 void DF_dvsqrt(void);
411 
418 {
419  //dvector cv1=value(v1);
420  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
421  for (int i=v1.indexmin();i<=v1.indexmax();i++)
422  {
423  vtmp.elem_value(i)=sqrt(v1.elem_value(i));
424  }
425 
428  save_identifier_string("ddd");
429  fp->save_dvar_vector_value(v1);
431  fp->save_dvar_vector_position(vtmp);
432  save_identifier_string("eve");
433  GRAD_STACK1->set_gradient_stack(DF_dvsqrt);
434 
435  return vtmp;
436 }
443 {
444  /*
445  //dvector cv1=value(v1);
446  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
447  for (int i=v1.indexmin();i<=v1.indexmax();i++)
448  {
449  vtmp.elem_value(i)=sqrt(v1.elem_value(i));
450  }
451 
452  gradient_structure* gs = gradient_structure::get();
453  DF_FILE* fp = gs->fp;
454  save_identifier_string("ddd");
455  fp->save_dvar_vector_value(v1);
456  fp->save_dvar_vector_position(v1);
457  fp->save_dvar_vector_position(vtmp);
458  save_identifier_string("eve");
459  gs->GRAD_STACK1->set_gradient_stack(DF_dvsqrt);
460  return vtmp;
461  */
462 
463  return pow(v1, 2.0);
464 }
468 void DF_dvsqrt(void)
469 {
471 
472  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
479  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
480  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
481  {
482  //vtmp.elem(i)=sin(value(v1.elem(i))));
483  dfv1(i)=dfvtmp(i)/(2*sqrt(v1.elem(i)));
484  }
485  dfv1.save_dvector_derivatives(v1pos);
486  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
487 }
488 
489 void DF_dvpow(void);
490 
496 dvar_vector pow(const dvar_vector& v1, const double e)
497 {
498  //dvector cv1=value(v1);
499  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
500  for (int i=v1.indexmin();i<=v1.indexmax();i++)
501  {
502  vtmp.elem_value(i)=pow(v1.elem_value(i),e);
503  }
504 
507  save_identifier_string("ddf");
508  fp->save_dvar_vector_value(v1);
509  fp->save_double_value(e);
511  fp->save_dvar_vector_position(vtmp);
512  save_identifier_string("eef");
513  GRAD_STACK1->set_gradient_stack(DF_dvpow);
514 
515  return vtmp;
516 }
520 void DF_dvpow(void)
521 {
523 
524  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
529  double e=fp->restore_double_value();
532  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
533  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
534  {
535  //vtmp.elem(i)=sin(value(v1.elem(i))));
536  dfv1(i)=dfvtmp(i)*e*pow(v1.elem(i),e-1);
537  }
538  dfv1.save_dvector_derivatives(v1pos);
539  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
540 }
541 
542 
543 // Don't have the functions for savinf and restoring
544 // prevariables as yet
545 
546 void DF_dvdvpow(void);
547 
553 {
554  //dvector cv1=value(v1);
555  double ce=value(e);
556  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
557  for (int i=v1.indexmin();i<=v1.indexmax();i++)
558  {
559  vtmp.elem_value(i)=pow(v1.elem_value(i),ce);
560  }
561 
564  save_identifier_string("ddg");
565  fp->save_prevariable_value(e);
567  fp->save_dvar_vector_value(v1);
569  fp->save_dvar_vector_position(vtmp);
570  save_identifier_string("eeg");
571  GRAD_STACK1->set_gradient_stack(DF_dvdvpow);
572 
573  return vtmp;
574 }
575 
580 void DF_dvdvpow(void)
581 {
582  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
584 
591  double e=fp->restore_prevariable_value();
593  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
594  double dfe=0.;
595  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
596  {
597  double tmp=pow(v1.elem(i),e-1);
598  //vtmp.elem(i)=pow(value(v1.elem(i)),e);
599  dfv1(i)=dfvtmp(i)*e*tmp;
600  dfe+=dfvtmp(i)*v1.elem(i)*tmp*log(v1.elem(i));
601  }
602  dfv1.save_dvector_derivatives(v1pos);
603  save_double_derivative(dfe,epos);
604  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
605 }
606 
607 void DF_dvcpow(void);
608 
613 dvar_vector pow(const dvar_vector& v1,int e)
614 {
615  //dvector cv1=value(v1);
616  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
617  for (int i=v1.indexmin();i<=v1.indexmax();i++)
618  {
619  vtmp.elem_value(i)=pow(v1.elem_value(i),e);
620  }
621 
624  save_identifier_string("ddf");
625  fp->save_dvar_vector_value(v1);
626  fp->save_double_value(double(e));
628  fp->save_dvar_vector_position(vtmp);
629  save_identifier_string("eef");
630  GRAD_STACK1->set_gradient_stack(DF_dvcpow);
631 
632  return vtmp;
633 }
634 
639 void DF_dvcpow(void)
640 {
642 
643  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
648  double e=fp->restore_double_value();
651  dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
652  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
653  {
654  //vtmp.elem(i)=sin(value(v1.elem(i))));
655  dfv1(i)=dfvtmp(i)*e*pow(v1.elem(i),e-1);
656  }
657  dfv1.save_dvector_derivatives(v1pos);
658  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
659 }
660 
661 void DF_cdvpow(void);
662 
667 dvar_vector pow(const dvector& v1,const prevariable& e)
668 {
669  //dvector cv1=value(v1);
670  double ce=value(e);
671  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
672  for (int i=v1.indexmin();i<=v1.indexmax();i++)
673  {
674  vtmp.elem_value(i)=pow(v1.elem(i),ce);
675  }
676 
679  save_identifier_string("eddg");
680  fp->save_prevariable_value(e);
682  fp->save_dvector_value(v1);
683  fp->save_dvector_position(v1);
684  fp->save_dvar_vector_position(vtmp);
685  save_identifier_string("feeg");
686  GRAD_STACK1->set_gradient_stack(DF_cdvpow);
687 
688  return vtmp;
689 }
690 
695 void DF_cdvpow(void)
696 {
697  // int ierr=fsetpos(gradient_structure::get_fp(),&filepos);
699 
700  verify_identifier_string("feeg");
704  dvector v1=fp->restore_dvector_value(v1pos);
706  double e=fp->restore_prevariable_value();
707  verify_identifier_string("eddg");
708  //dvector dfv1(dfvtmp.indexmin(),dfvtmp.indexmax());
709  double dfe=0.;
710  for (int i=dfvtmp.indexmin();i<=dfvtmp.indexmax();i++)
711  {
712  double tmp=pow(v1.elem(i),e);
713  //vtmp.elem(i)=pow(value(v1.elem(i)),e);
714  //dfv1(i)=dfvtmp(i)*e*tmp;
715  dfe+=dfvtmp(i)*tmp*log(v1.elem(i));
716  }
717  //dfv1.save_dvector_derivatives(v1pos);
718  save_double_derivative(dfe,epos);
719  //ierr=fsetpos(gradient_structure::get_fp(),&filepos);
720 }
722 {
725 
726  dvar_vector y(x.indexmin(), x.indexmax());
727  for(int i=x.indexmin(); i<=x.indexmax(); i++)
728  {
729  y(i)=pow(x(i),a(i));
730  }
731 
733 
734  return y;
735 }
Description not yet available.
Definition: fvar.hpp:920
Base class for dvariable.
Definition: fvar.hpp:1315
d3_array tan(const d3_array &arr3)
Returns d3_array results with computed tan from elements in arr3.
Definition: d3arr2a.cpp:73
d3_array sqr(const d3_array &arr3)
Returns d3_array with square values from arr3.
Definition: d3arr2c.cpp:25
Description not yet available.
Definition: fvar.hpp:4440
double & elem(int i)
Definition: dvector.h:152
void DF_dvdvpow(void)
Description not yet available.
Definition: fvar_a29.cpp:580
double & elem_value(int i)
Definition: fvar.hpp:2226
void DF_dvtan(void)
Adjoint function to compute gradients for tan(const dvar_vector&amp;).
Definition: fvar_a29.cpp:338
#define x
void save_prevariable_value(const prevariable &v)
Definition: cmpdif8.cpp:76
Vector of double precision numbers.
Definition: dvector.h:50
int indexmin() const
Get minimum valid index.
Definition: dvector.h:199
void DF_dvatan(void)
Adjoint function to compute gradients for tan(const dvar_vector&amp;).
Definition: fvar_a29.cpp:389
df1_one_variable atan(const df1_one_variable &x)
Definition: df11fun.cpp:312
void save_dvector_derivatives(const dvar_vector_position &pos) const
Puts the derivative values in a dvector into a dvar_vector&#39;s guts.
Definition: cmpdif5.cpp:212
d3_array sin(const d3_array &arr3)
Returns d3_array results with computed sin from elements in arr3.
Definition: d3arr2a.cpp:43
Description not yet available.
Definition: fvar.hpp:4814
void DF_dvcpow(void)
Description not yet available.
Definition: fvar_a29.cpp:639
df1_two_variable fabs(const df1_two_variable &x)
Definition: df12fun.cpp:891
Description not yet available.
Definition: fvar.hpp:4923
void DF_dvpow(void)
Adjoint function to compute gradients for pow(const dvar_vector&amp;, const double).
Definition: fvar_a29.cpp:520
ADMB variable vector.
Definition: fvar.hpp:2172
void verify_identifier_string(const char *)
Verifies gradient stack string.
Definition: cmpdif3.cpp:149
void DF_dvsin(void)
Adjoint function to compute gradients for sin(const dvar_vector&amp;)
Definition: fvar_a29.cpp:90
dvector restore_dvector_value(const dvector_position &tmp)
Definition: cmpdif4.cpp:178
Holds the data for the prevariable class.
Definition: fvar.hpp:191
void set_gradient_stack(void(*func)(void), double *dep_addr, double *ind_addr1=NULL, double mult1=0, double *ind_addr2=NULL, double mult2=0)
Description not yet available.
Definition: fvar.hpp:1045
void DF_dvcos(void)
Description not yet available.
Definition: fvar_a29.cpp:209
void DF_dvlog(void)
Description not yet available.
Definition: fvar_a29.cpp:271
void save_dvector_position(const dvector &v)
Definition: cmpdif4.cpp:32
prnstream & endl(prnstream &)
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr2c.cpp:11
prevariable_position restore_prevariable_position()
Definition: cmpdif8.cpp:43
void save_prevariable_position(const prevariable &v)
Definition: cmpdif8.cpp:60
void save_dvector_value(const dvector &v)
Definition: cmpdif4.cpp:130
void save_dvar_vector_value(const dvar_vector &v)
Definition: cmpdif4.cpp:106
dvar_vector_position restore_dvar_vector_position()
Definition: cmpdif4.cpp:69
void RETURN_ARRAYS_INCREMENT()
Definition: gradstrc.cpp:478
#define min(a, b)
Definition: cbivnorm.cpp:188
int indexmax() const
Get maximum valid index.
Definition: dvector.h:204
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void DF_cdvpow(void)
Description not yet available.
Definition: fvar_a29.cpp:695
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
Definition: d3arr2a.cpp:28
double restore_double_value()
Definition: cmpdif8.cpp:186
static _THREAD gradient_structure * _instance
int save_identifier_string(const char *)
Writes a gradient stack verification string.
Definition: cmpdif2.cpp:315
dvector restore_dvar_vector_value(const dvar_vector_position &tmp)
Restores the size, address, and value information for a dvar_vector.
Definition: cmpdif4.cpp:227
void DF_dvexp(void)
Description not yet available.
Definition: fvar_a29.cpp:148
dvector_position restore_dvector_position()
Definition: cmpdif4.cpp:88
int indexmin() const
Definition: fvar.hpp:2287
void save_dvar_vector_position(const dvar_vector &v)
Definition: cmpdif3.cpp:214
void DF_dvsqrt(void)
Adjoint function to compute gradients for sqrt(const dvar_vector&amp;).
Definition: fvar_a29.cpp:468
static _THREAD DF_FILE * fp
d3_array cos(const d3_array &arr3)
Returns d3_array results with computed cos from elements in arr3.
Definition: d3arr2a.cpp:58
Stores the adjoint gradient data that will be processed by gradcalc.
dvector restore_dvar_vector_derivatives(const dvar_vector_position &tmp)
Description not yet available.
Definition: cmpdif5.cpp:150
double restore_prevariable_value()
Definition: cmpdif8.cpp:168
void RETURN_ARRAYS_DECREMENT()
Definition: gradstrc.cpp:511
double_and_int * va
Definition: fvar.hpp:2175
void save_double_value(double x)
Definition: cmpdif8.cpp:94
dvector value(const df1_one_vector &v)
Definition: df11fun.cpp:69
void save_double_derivative(const double x, const prevariable_position &_pos)
Description not yet available.
Definition: cmpdif8.cpp:28
static _THREAD grad_stack * GRAD_STACK1
#define max(a, b)
Definition: cbivnorm.cpp:189
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
double *& get_v(void)
Definition: dvector.h:148
int indexmax() const
Definition: fvar.hpp:2292
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr2a.cpp:13
double x
&lt; value of the variable
Definition: fvar.hpp:195
d3_array pow(const d3_array &m, int e)
Description not yet available.
Definition: d3arr6.cpp:17