ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fvar_m28.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.cpp
12 // constructors, destructors and misc functions involving class prevariable
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 
26 #include <stdio.h>
27 #ifndef __SUN__
28 #endif
29 #include <math.h>
30 
36 {
39  int min = index_min;
40  int max = index_max;
41  dvar_vector* pv = m + min;
42  for (int i = min; i <= max; ++i)
43  {
44  *pv /= x;
45  ++pv;
46  }
48  return (*this);
49 }
50 
56 {
59  int min = index_min;
60  int max = index_max;
61  dvar_vector* pv = m + min;
62  for (int i = min; i <= max; ++i)
63  {
64  *pv /= x;
65  ++pv;
66  }
68  return (*this);
69 }
70 
76 {
79  int min = index_min;
80  int max = index_max;
81  dvar_vector* pv = m + min;
82  for (int i = min; i <= max; ++i)
83  {
84  *pv = x;
85  ++pv;
86  }
88  return (*this);
89 }
90 
96 {
99  int min = index_min;
100  int max = index_max;
101  dvar_vector* pv = m + min;
102  for (int i = min; i <= max; ++i)
103  {
104  *pv = x;
105  ++pv;
106  }
108  return (*this);
109 }
110 
116 {
119  int min = index_min;
120  int max = index_max;
121  dvar_vector* pv = m + min;
122  for (int i = min; i <= max; ++i)
123  {
124  *pv *= x;
125  ++pv;
126  }
128  return (*this);
129 }
130 
136 {
139  int min = index_min;
140  int max = index_max;
141  dvar_vector* pv = m + min;
142  for (int i = min; i <= max; ++i)
143  {
144  *pv *= x;
145  ++pv;
146  }
148  return (*this);
149 }
Base class for dvariable.
Definition: fvar.hpp:1315
#define x
ADMB variable vector.
Definition: fvar.hpp:2172
dvar_matrix & operator/=(const prevariable &t)
Description not yet available.
Definition: fvar_m28.cpp:55
void RETURN_ARRAYS_INCREMENT()
Definition: gradstrc.cpp:478
#define min(a, b)
Definition: cbivnorm.cpp:188
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
static _THREAD gradient_structure * _instance
int index_min
Definition: fvar.hpp:2482
dvar_matrix & operator=(const dvar_matrix &)
Assigns other values to dvar_matrix.
Definition: fvar_mat.cpp:515
Class definition of matrix with derivitive information .
Definition: fvar.hpp:2480
void RETURN_ARRAYS_DECREMENT()
Definition: gradstrc.cpp:511
#define max(a, b)
Definition: cbivnorm.cpp:189
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
int index_max
Definition: fvar.hpp:2483
dvar_matrix & operator*=(const prevariable &t)
Description not yet available.
Definition: fvar_m28.cpp:135
dvar_vector * m
Definition: fvar.hpp:2484