ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fvar_o10.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 // file: fvar_ops.cpp
12 // operators involving prevariables
13 
14 #include "fvar.hpp"
15 
16 #ifdef __TURBOC__
17  #pragma hdrstop
18  #include <iostream.h>
19 #endif
20 
21 #ifdef __ZTC__
22  #include <iostream.hpp>
23 #endif
24 
25 #include <stdio.h>
26 #include <math.h>
27 
28 #if defined(__BORLANDC__)
29 # if (__BORLANDC__ >= 0x0540)
30 
34 prevariable& prevariable::operator=(const double t) const
35 {
36  (*v).x=t;
38  set_gradient_stack0(df_eq_pvdoub,&(v->x));
39  return((prevariable&)(*this));
40 }
41 
47 {
48  (*v).x=(*t.v).x;
50  set_gradient_stack1(default_evaluation1,&(v->x),&(t.v->x));
51  return((prevariable&)(*this));
52 }
53 # endif
54 #endif
55 
62 {
63  (*v).x = (*t.v).x;
65  set_gradient_stack1(default_evaluation1,&(v->x),&(t.v->x));
66 
67  return *this;
68 }
69 
76 {
77  (*v).x = t;
79  set_gradient_stack0(default_evaluation0, &(v->x));
80  return *this;
81 }
Base class for dvariable.
Definition: fvar.hpp:1315
#define x
void default_evaluation1(void)
Description not yet available.
Definition: def_eval.cpp:93
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double_and_int * v
pointer to the data
Definition: fvar.hpp:1333
prevariable & operator=(const prevariable &)
Assigns a value to a prevariable object.
Definition: fvar_o10.cpp:61
static _THREAD grad_stack * GRAD_STACK1
double x
&lt; value of the variable
Definition: fvar.hpp:195
void default_evaluation0(void)
Description not yet available.
Definition: def_eval.cpp:126