ADMB Documentation  11.1.2504
 All Classes Files Functions Variables Typedefs Friends Defines
f3arr13.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: f3arr13.cpp 1715 2014-03-03 19:38:48Z johnoel $
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 d3_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    for (int i=slicemin();i<=slicemax();i++)
00027    {
00028      elem(i)=m1.elem(i);
00029    }
00030    return(*this);
00031  }
00032 
00037  dvar3_array& dvar3_array::operator= (double x)
00038  {
00039    for (int i=slicemin();i<=slicemax();i++)
00040    {
00041      elem(i)=x;
00042    }
00043    return(*this);
00044  }