ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
model53x.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
7 #include <admodel.h>
8 
10  const dvar_vector& x,const int& _ii)
11  {
12  if (allocated(*this))
13  {
14  int& ii=(int&) _ii;
15  dvar_vector& d=(dvar_vector&) _d;
16  int mmin=indexmin();
17  int mmax=indexmax();
18  for (int i=mmin;i<=mmax;i++)
19  {
20  if (allocated((*this)(i)))
21  {
22  int rmin=((*this)(i)).indexmin();
23  int rmax=((*this)(i)).indexmax();
24  for (int j=rmin;j<=rmax;j++)
25  {
26  if (allocated((*this)(i,j)))
27  {
28  int cmin=(*this)(i,j).indexmin();
29  int cmax=(*this)(i,j).indexmin();
30  for (int k=cmin;k<=cmax;k++)
31  {
32  d(ii)=0.0;
33  ii++;
34  }
35  }
36  }
37  }
38  }
39  }
40  }
virtual void sd_vscale(const dvar_vector &d, const dvar_vector &x, const int &ii)
Definition: model53x.cpp:9
#define x
int allocated(const ivector &v)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: fvar_a59.cpp:13
ADMB variable vector.
Definition: fvar.hpp:2172
int indexmax() const
Definition: fvar.hpp:4273
Description not yet available.
int indexmin() const
Definition: fvar.hpp:4272