ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
model42.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 
9 void copy_value_from_vector(const double& _sd,const dvector& x,const int & _ii)
10 {
11  double& sd = (double&) _sd;
12  int& ii = (int&) _ii;
13  sd=x(++ii);
14 }
15 
16 void copy_value_from_vector(const dvector& _sd,const dvector& x,const int & _ii)
17 {
18  dvector& sd = (dvector&) _sd;
19  int& ii = (int&) _ii;
20  int mmin=sd.indexmin();
21  int mmax=sd.indexmax();
22  for (int i=mmin;i<=mmax;i++)
23  sd(i)=x(++ii);
24 }
25 
26 void copy_value_from_vector(const dmatrix& _sd,const dvector& x,const int & _ii)
27 {
28  dmatrix& sd = (dmatrix&) _sd;
29  int& ii = (int&) _ii;
30  int mmin=sd.indexmin();
31  int mmax=sd.indexmax();
32  for (int i=mmin;i<=mmax;i++)
33  copy_value_from_vector(sd(i),x,ii);
34 }
#define x
Vector of double precision numbers.
Definition: dvector.h:50
int indexmin() const
Get minimum valid index.
Definition: dvector.h:199
int indexmin() const
Definition: fvar.hpp:2917
void copy_value_from_vector(const double &_sd, const dvector &x, const int &_ii)
Definition: model42.cpp:9
int indexmax() const
Get maximum valid index.
Definition: dvector.h:204
Description not yet available.
Description not yet available.
Definition: fvar.hpp:2819
int indexmax() const
Definition: fvar.hpp:2921