ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
model53x.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  */
00007 #include <admodel.h>
00008 
00009   void param_init_d3array::sd_vscale(const dvar_vector& _d,
00010     const dvar_vector& x,const int& _ii)
00011   {
00012     if (allocated(*this))
00013     {
00014       int& ii=(int&) _ii;
00015       dvar_vector& d=(dvar_vector&) _d;
00016       int mmin=indexmin();
00017       int mmax=indexmax();
00018       for (int i=mmin;i<=mmax;i++)
00019       {
00020         if (allocated((*this)(i)))
00021         {
00022           int rmin=((*this)(i)).indexmin();
00023           int rmax=((*this)(i)).indexmax();
00024           for (int j=rmin;j<=rmax;j++)
00025           {
00026             if (allocated((*this)(i,j)))
00027             {
00028               int cmin=(*this)(i,j).indexmin();
00029               int cmax=(*this)(i,j).indexmin();
00030               for (int k=cmin;k<=cmax;k++)
00031               {
00032                 d(ii)=0.0;
00033                 ii++;
00034               }
00035             }
00036           }
00037         }
00038       }
00039     }
00040   }