ADMB Documentation
-a65f1c97
Main Page
Function Reference
Classes
Source Code
Related Pages
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
linad99
f5arr2.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
17
dvar5_array
operator/
(
const
d5_array
& m,
const
prevariable
& d)
18
{
19
gradient_structure
* gs =
gradient_structure::_instance
;
20
gs->
RETURN_ARRAYS_INCREMENT
();
21
22
dvar5_array
tmp;
23
tmp.
allocate
(m);
24
for
(
int
i=tmp.
indexmin
();i<=tmp.
indexmax
();i++)
25
{
26
tmp(i)=m(i)/d;
27
}
28
gs->
RETURN_ARRAYS_DECREMENT
();
29
return
tmp;
30
}
31
36
dvar5_array
operator/
(
const
dvar5_array
& m,
const
double
d)
37
{
38
gradient_structure
* gs =
gradient_structure::_instance
;
39
gs->
RETURN_ARRAYS_INCREMENT
();
40
dvar5_array
tmp;
41
tmp.
allocate
(m);
42
for
(
int
i=tmp.
indexmin
();i<=tmp.
indexmax
();i++)
43
{
44
tmp(i)=m(i)/d;
45
}
46
gs->
RETURN_ARRAYS_DECREMENT
();
47
return
tmp;
48
}
49
54
dvar5_array
operator/
(
const
dvar5_array
& m,
const
prevariable
& d)
55
{
56
gradient_structure
* gs =
gradient_structure::_instance
;
57
gs->
RETURN_ARRAYS_INCREMENT
();
58
dvar5_array
tmp;
59
tmp.
allocate
(m);
60
for
(
int
i=tmp.
indexmin
();i<=tmp.
indexmax
();i++)
61
{
62
tmp(i)=m(i)/d;
63
}
64
gs->
RETURN_ARRAYS_DECREMENT
();
65
return
tmp;
66
}
67
72
void
dvar5_array::operator/=
(
const
prevariable
& d)
73
{
74
gradient_structure
* gs =
gradient_structure::_instance
;
75
gs->
RETURN_ARRAYS_INCREMENT
();
76
for
(
int
i=
indexmin
();i<=
indexmax
();i++)
77
{
78
(*this)(i)/=d;
79
}
80
gs->
RETURN_ARRAYS_DECREMENT
();
81
}
82
87
void
dvar5_array::operator/=
(
const
double
& d)
88
{
89
gradient_structure
* gs =
gradient_structure::_instance
;
90
gs->
RETURN_ARRAYS_INCREMENT
();
91
for
(
int
i=
indexmin
();i<=
indexmax
();i++)
92
{
93
(*this)(i)/=d;
94
}
95
gs->
RETURN_ARRAYS_DECREMENT
();
96
}
prevariable
Base class for dvariable.
Definition:
fvar.hpp:1315
dvar5_array::indexmax
int indexmax() const
Definition:
fvar.hpp:6650
dvar5_array::allocate
void allocate(int hhsl, int hhsu, int hsl, int hsu, int sl, int sh, int nrl, int nrh, int ncl, int nch)
Allocate dvar5_array with dimensions [hsl to hsu] x [sl to sh] x [nrl to nrh] x [ncl to nch] x [l5 to...
Definition:
f5arr.cpp:435
gradient_structure::RETURN_ARRAYS_INCREMENT
void RETURN_ARRAYS_INCREMENT()
Definition:
gradstrc.cpp:478
dvar5_array
Description not yet available.
Definition:
fvar.hpp:6498
fvar.hpp
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
dvar5_array::indexmin
int indexmin() const
Definition:
fvar.hpp:6646
gradient_structure::_instance
static _THREAD gradient_structure * _instance
Definition:
gradient_structure.h:114
dvar5_array::operator/=
void operator/=(const prevariable &d)
Description not yet available.
Definition:
f5arr2.cpp:72
d5_array
Description not yet available.
Definition:
fvar.hpp:6331
gradient_structure::RETURN_ARRAYS_DECREMENT
void RETURN_ARRAYS_DECREMENT()
Definition:
gradstrc.cpp:511
operator/
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
Definition:
d3arr2b.cpp:14
gradient_structure
class for things related to the gradient structures, including dimension of arrays, size of buffers, etc.
Definition:
gradient_structure.h:107
Generated on Wed Sep 7 2022 00:01:28 for ADMB Documentation by
1.8.5