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 copy_value_from_vector(const double& _sd,const dvector& x,const int & _ii) 00010 { 00011 double& sd = (double&) _sd; 00012 int& ii = (int&) _ii; 00013 sd=x(++ii); 00014 } 00015 00016 void copy_value_from_vector(const dvector& _sd,const dvector& x,const int & _ii) 00017 { 00018 dvector& sd = (dvector&) _sd; 00019 int& ii = (int&) _ii; 00020 int mmin=sd.indexmin(); 00021 int mmax=sd.indexmax(); 00022 for (int i=mmin;i<=mmax;i++) 00023 sd(i)=x(++ii); 00024 } 00025 00026 void copy_value_from_vector(const dmatrix& _sd,const dvector& x,const int & _ii) 00027 { 00028 dmatrix& sd = (dmatrix&) _sd; 00029 int& ii = (int&) _ii; 00030 int mmin=sd.indexmin(); 00031 int mmax=sd.indexmax(); 00032 for (int i=mmin;i<=mmax;i++) 00033 copy_value_from_vector(sd(i),x,ii); 00034 }
Generated on Tue Mar 8 2016 19:51:35 for ADMB Documentation by 1.8.0 |