ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fvar_a27.cpp
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  */
11 #include "fvar.hpp"
12 #if defined(__TURBOC__)
13  #pragma hdrstop
14  #include <alloc.h>
15 #endif
16 
17 #include <stdlib.h>
18 
24  {
25  if (indexmin() != t.indexmin() || indexmax() != t.indexmax())
26  {
27  cerr << " Incompatible bounds in "
28  "dvar_vector& dvar_vector::operator = (const dvector& t)\n";
29  ad_exit(21);
30  }
31 
32  for ( int i=indexmin(); i<=indexmax(); i++)
33  {
34  va[i].x=t[i];
35  }
36 
40  fp->save_dvar_vector_position(*this);
42  GRAD_STACK1->set_gradient_stack(dv_init);
43 
44  return *this;
45  }
Description not yet available.
Definition: fvar.hpp:920
Vector of double precision numbers.
Definition: dvector.h:50
int indexmin() const
Get minimum valid index.
Definition: dvector.h:199
void dv_init(void)
Description not yet available.
Definition: fvar_a24.cpp:40
exitptr ad_exit
Definition: gradstrc.cpp:53
ADMB variable vector.
Definition: fvar.hpp:2172
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
int indexmax() const
Get maximum valid index.
Definition: dvector.h:204
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int save_identifier_string(const char *)
Writes a gradient stack verification string.
Definition: cmpdif2.cpp:315
int indexmin() const
Definition: fvar.hpp:2287
void save_dvar_vector_position(const dvar_vector &v)
Definition: cmpdif3.cpp:214
static _THREAD DF_FILE * fp
Stores the adjoint gradient data that will be processed by gradcalc.
dvar_vector & operator=(const dvar_vector &t)
Assign values from other t to dvar_vector.
Definition: fvar_a20.cpp:31
double_and_int * va
Definition: fvar.hpp:2175
static _THREAD grad_stack * GRAD_STACK1
int indexmax() const
Definition: fvar.hpp:2292
double x
&lt; value of the variable
Definition: fvar.hpp:195