ADMB Documentation  11.1.2246
 All Classes Files Functions Variables Typedefs Friends Defines
dvect26.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: dvect26.cpp 1112 2013-07-12 21:41:41Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include "fvar.hpp"
00012 
00017   void dvector::reallocate(double s)
00018   {
00019     if (::allocated(*this))
00020     {
00021       dvector tmp(indexmin(),indexmax());
00022       tmp=(*this);
00023       deallocate();
00024       allocate(indexmin(),int(s*indexmax()));
00025       *this=tmp;
00026     }
00027     else
00028     {
00029       dvector tmp(1,s);
00030     }
00031   }