ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
f3arr14.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include "fvar.hpp"
00012 
00017 dvar3_array& dvar3_array::operator=(const dvar3_array& m1)
00018  {
00019    if (slicemin() != m1.slicemin() || slicemax() != m1.slicemax())
00020    {
00021      cerr << " Incompatible array bounds in "
00022      "dvar_matrix& operator = (const dvar_vector&)\n";
00023      ad_exit(21);
00024    }
00025 
00026    if (t != m1.t)            // check for condition that both matrices
00027    {                         // don't point to the same object
00028      for (int i=slicemin();i<=slicemax();i++)
00029      {
00030        elem(i)=m1.elem(i);
00031      }
00032    }
00033    return(*this);
00034  }