ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
f3arr10.cpp
Go to the documentation of this file.
1 
6 #include "fvar.hpp"
7 
15 {
16  dvar3_array result;
17  result.allocate(arr3);
18  for (int i = result.slicemin(); i<= result.slicemax(); ++i)
19  {
20  result(i) = d / arr3(i);
21  }
22  return result;
23 }
30 dvar3_array operator/(const prevariable& d, const d3_array& arr3)
31 {
32  dvar3_array result;
33  result.allocate(arr3);
34  for (int i = result.slicemin(); i<= result.slicemax(); ++i)
35  {
36  result(i) = d / arr3(i);
37  }
38  return result;
39 }
46 dvar3_array operator/(const double d, const dvar3_array& arr3)
47 {
48  dvar3_array result;
49  result.allocate(arr3);
50  for (int i = result.slicemin(); i<= result.slicemax(); ++i)
51  {
52  result(i) = d / arr3(i);
53  }
54  return result;
55 }
Base class for dvariable.
Definition: fvar.hpp:1315
int slicemin() const
Definition: fvar.hpp:4274
void allocate(int sl, int sh, int nrl, int nrh, int ncl, int nch)
Allocate variable vector of matrices with dimensions [sl to sh] x ([nrl to nrh] x [ncl to nch]) where...
Definition: f3arr.cpp:91
int slicemax() const
Definition: fvar.hpp:4275
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
Definition: fvar.hpp:4197
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
Definition: d3arr2b.cpp:14
Description not yet available.
Definition: fvar.hpp:3727