ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
d4arr2.cpp
Go to the documentation of this file.
1 
5 #include "fvar.hpp"
6 
12 void d4_array::operator/=(double d)
13 {
14  for (int i = indexmin(); i <= indexmax(); ++i)
15  {
16  (*this)(i) /= d;
17  }
18 }
24 d4_array operator/(const d4_array& arr4, double d)
25 {
26  d4_array results;
27  results.allocate(arr4);
28  for (int i = results.indexmin(); i <= results.indexmax(); ++i)
29  {
30  results(i) = arr4(i) / d;
31  }
32  return results;
33 }
39 d4_array operator/(double d, const d4_array& arr4)
40 {
41  d4_array results;
42  results.allocate(arr4);
43  for (int i = results.indexmin(); i <= results.indexmax(); ++i)
44  {
45  for (int j = results(i).indexmin(); j <= results(i).indexmax(); ++j)
46  {
47  results(i, j) = d / arr4(i, j);
48  }
49  }
50  return results;
51 }
void operator/=(double d)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d4arr2.cpp:12
void allocate(int hsl, int hsu, int sl, int sh, int nrl, int nrh, int ncl, int nch)
Allocate arrays with dimension [hsl to hsu] x [sl to sh] x [nrl to nrh] x [ncl to nch]...
Definition: d4arr.cpp:344
int j
Definition: fvar.hpp:3636
Description not yet available.
Definition: fvar.hpp:5161
dvector * d
Definition: fvar.hpp:3649
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
int indexmin() const
Definition: fvar.hpp:5305
int indexmax() const
Definition: fvar.hpp:5309
d3_array operator/(const d3_array &m, const double d)
Author: David Fournier.
Definition: d3arr2b.cpp:14