ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
f3arr14.cpp
Go to the documentation of this file.
1 
8 #include "fvar.hpp"
9 
16 {
17  if (t != other.t)
18  {
19  int min = slicemin();
20  int max = slicemax();
21 #ifndef OPT_LIB
22  if (min != other.slicemin() || max != other.slicemax())
23  {
24  cerr << "Incompatible array bounds in "
25  << "dvar_matrix& dvar3_array::operator=(const dvar3_vector&).\n";
26  ad_exit(1);
27  }
28 #endif
29  // check for condition that both matricesdon't point to the same object
30  dvar_matrix* pti = t + min;
31  const dvar_matrix* potheri = &other(min);
32  for (int i = min; i <= max; ++i)
33  {
34  *pti = *potheri;
35  ++pti;
36  ++potheri;
37  }
38  }
39  return *this;
40 }
int slicemin() const
Definition: fvar.hpp:4274
int slicemax() const
Definition: fvar.hpp:4275
exitptr ad_exit
Definition: gradstrc.cpp:53
dvar_matrix * t
Definition: fvar.hpp:4199
dvar3_array & operator=(const d3_array &m1)
Assign element values from scalar arr3 to dvar3_array.
Definition: f3arr13.cpp:19
#define min(a, b)
Definition: cbivnorm.cpp:188
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
Definition: fvar.hpp:4197
Class definition of matrix with derivitive information .
Definition: fvar.hpp:2480
#define max(a, b)
Definition: cbivnorm.cpp:189