105 dfv1(i)=dfvtmp(i)*
cos(v1.
elem(i));
107 dfv1.save_dvector_derivatives(v1pos);
125 for (
int i = min; i <=
max; ++i)
127 pvtmp->
x =
exp(pv1->
x);
164 double* pdfvtmp = dfvtmp.
get_v() +
min;
165 for (
int i = min; i <=
max; ++i)
168 *pdfv1 = *pdfvtmp * *pvtmp;
224 dfv1(i)=-dfvtmp(i)*
sin(v1.
elem(i));
226 dfv1.save_dvector_derivatives(v1pos);
244 for (
int i = min; i <=
max; ++i)
246 pvtmp->
x =
log(pv1->
x);
264 int ad_debug_arithmetic=1;
288 double* pdfvtmp = dfvtmp.
get_v() +
min;
289 for (
int i = min; i <=
max; ++i)
292 if (ad_debug_arithmetic==1)
296 cerr <<
"Possible overflow in DF_dvlog" <<
endl;
299 *pdfv1 = *pdfvtmp / *pv1;
331 GRAD_STACK1-> set_gradient_stack(
DF_dvtan);
355 dfv1.save_dvector_derivatives(v1pos);
404 dfv1(i)=dfvtmp(i)/(1.+
pow(v1.
elem(i),2));
483 dfv1(i)=dfvtmp(i)/(2*
sqrt(v1.
elem(i)));
536 dfv1(i)=dfvtmp(i)*e*
pow(v1.
elem(i),e-1);
538 dfv1.save_dvector_derivatives(v1pos);
597 double tmp=
pow(v1.
elem(i),e-1);
599 dfv1(i)=dfvtmp(i)*e*tmp;
602 dfv1.save_dvector_derivatives(v1pos);
655 dfv1(i)=dfvtmp(i)*e*
pow(v1.
elem(i),e-1);
657 dfv1.save_dvector_derivatives(v1pos);
715 dfe+=dfvtmp(i)*tmp*
log(v1.
elem(i));
Description not yet available.
Base class for dvariable.
d3_array tan(const d3_array &arr3)
Returns d3_array results with computed tan from elements in arr3.
d3_array sqr(const d3_array &arr3)
Returns d3_array with square values from arr3.
Description not yet available.
void DF_dvdvpow(void)
Description not yet available.
double & elem_value(int i)
void DF_dvtan(void)
Adjoint function to compute gradients for tan(const dvar_vector&).
void save_prevariable_value(const prevariable &v)
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
void DF_dvatan(void)
Adjoint function to compute gradients for tan(const dvar_vector&).
df1_one_variable atan(const df1_one_variable &x)
void save_dvector_derivatives(const dvar_vector_position &pos) const
Puts the derivative values in a dvector into a dvar_vector's guts.
d3_array sin(const d3_array &arr3)
Returns d3_array results with computed sin from elements in arr3.
Description not yet available.
void DF_dvcpow(void)
Description not yet available.
df1_two_variable fabs(const df1_two_variable &x)
Description not yet available.
void DF_dvpow(void)
Adjoint function to compute gradients for pow(const dvar_vector&, const double).
void verify_identifier_string(const char *)
Verifies gradient stack string.
void DF_dvsin(void)
Adjoint function to compute gradients for sin(const dvar_vector&)
dvector restore_dvector_value(const dvector_position &tmp)
Holds the data for the prevariable class.
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.
void DF_dvcos(void)
Description not yet available.
void DF_dvlog(void)
Description not yet available.
void save_dvector_position(const dvector &v)
prnstream & endl(prnstream &)
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
prevariable_position restore_prevariable_position()
void save_prevariable_position(const prevariable &v)
void save_dvector_value(const dvector &v)
void save_dvar_vector_value(const dvar_vector &v)
dvar_vector_position restore_dvar_vector_position()
void RETURN_ARRAYS_INCREMENT()
int indexmax() const
Get maximum valid index.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void DF_cdvpow(void)
Description not yet available.
d3_array exp(const d3_array &arr3)
Returns d3_array results with computed exp from elements in arr3.
double restore_double_value()
static _THREAD gradient_structure * _instance
int save_identifier_string(const char *)
Writes a gradient stack verification string.
dvector restore_dvar_vector_value(const dvar_vector_position &tmp)
Restores the size, address, and value information for a dvar_vector.
void DF_dvexp(void)
Description not yet available.
dvector_position restore_dvector_position()
void save_dvar_vector_position(const dvar_vector &v)
void DF_dvsqrt(void)
Adjoint function to compute gradients for sqrt(const dvar_vector&).
static _THREAD DF_FILE * fp
d3_array cos(const d3_array &arr3)
Returns d3_array results with computed cos from elements in arr3.
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.
double restore_prevariable_value()
void RETURN_ARRAYS_DECREMENT()
void save_double_value(double x)
dvector value(const df1_one_vector &v)
void save_double_derivative(const double x, const prevariable_position &_pos)
Description not yet available.
static _THREAD grad_stack * GRAD_STACK1
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double x
< value of the variable
d3_array pow(const d3_array &m, int e)
Description not yet available.