40 cerr <<
" This version of ADMB only supports 1000 initial df1b2parameter"
121 for (
int i=mmin;i<=mmax;i++)
123 (*this)(i) = (
x(ii++));
128 for (
int i=mmin;i<=mmax;i++)
147 for (
int i=mmin;i<=mmax;i++)
149 (*this)(i).get_ind_index() = ii++;
154 for (
int i=mmin;i<=mmax;i++)
156 (*this)(i).get_ind_index() = -1;
190 for (
int i=rmin;i<=rmax;i++)
195 for (
int j=cmin;j<=cmax;j++)
197 (*this)(i,j).get_ind_index() = ii++;
204 for (
int i=rmin;i<=rmax;i++)
209 for (
int j=cmin;j<=cmax;j++)
211 (*this)(i,j).get_ind_index() = -1;
230 for (
int i=rmin;i<=rmax;i++)
235 for (
int j=cmin;j<=cmax;j++)
237 (*this)(i,j) = (
x(ii++));
313 int _n,
const char * s)
327 double _maxb,
const char * s)
363 u=
boundp(
x(ii++),fmin,fmax,fpen);
369 double diff=fmax-
fmin;
373 const double l4=
log(4.0);
374 double pen=.000001/diff;
375 fpen-=pen*(
log(ss+1.e-40)+
log((1.0-ss)+1.e-40)+l4);
392 u=
boundp(
x(ii++),fmin,fmax,fpen,s);
398 double diff=fmax-
fmin;
402 const double l4=
log(4.0);
403 double pen=.000001/diff;
404 fpen-=pen*(
log(ss+1.e-40)+
log((1.0-ss)+1.e-40)+l4);
425 double diff=fmax-
fmin;
426 const double l4=
log(4.0);
431 double pen=.000001/diff;
432 fpen-=pen*(
log(ss+1.e-40)+
log((1.0-ss)+1.e-40)+l4);
436 fpen+=
cube(-0.9999-x);
439 fpen+=1.e+6*
cube(-1.0-x);
442 fpen+=1.e+10*
cube(-1.02-x);
448 fpen+=
cube(x-0.9999);
451 fpen+=1.e+6*
cube(x-1.);
454 fpen+=1.e+10*
cube(x-1.02);
477 double diff=fmax-
fmin;
478 const double l4=
log(4.0);
486 double pen=.000001/diff;
487 fpen-=pen*(
log(ss+1.e-40)+
log((1.0-ss)+1.e-40)+l4);
491 fpen+=
cube(-0.9999-x);
494 fpen+=1.e+6*
cube(-1.0-x);
497 fpen+=1.e+10*
cube(-1.02-x);
503 fpen+=
cube(x-0.9999);
506 fpen+=1.e+6*
cube(x-1.);
509 fpen+=1.e+10*
cube(x-1.02);
526 double diff=fmax-
fmin;
538 const int& _ii,
double fmin,
double fmax)
543 int min=
x.indexmin();
544 int max=
x.indexmax();
545 for (
int i=min;i<=
max;i++)
548 const double pinv=1./
PI;
550 x(i)=fmin+(fmax-
fmin)*y;
564 int min=
x.indexmin();
565 int max=
x.indexmax();
566 for (
int i=min;i<=
max;i++)
568 x(i)=
boundp(v(ii++),fmin,fmax,fpen);
579 int min=
x.indexmin();
580 int max=
x.indexmax();
581 for (
int i=min;i<=
max;i++)
583 x(i)=
boundp(v(ii++),fmin,fmax,fpen,s);
656 for (
int i=mmin;i<=mmax;i++)
670 const double l4=
log(4.0);
671 double wght=.000001/diff;
672 pen-=wght*(
log(ss+1.e-40)+
log((1.0-ss)+1.e-40)+l4);
698 double _minb,
double _maxb)
710 double _minb,
double _maxb,
const char * s)
720 double _minb,
double _maxb,
int n,
const char * s)
778 y = (
boundp(
x(ii++),pv->getminb(),pv->getmaxb(),pen));
784 double diff=pv->getmaxb()-pv->getminb();
787 const double l4=
log(4.0);
788 double wght=.000001/diff;
789 pen-=wght*(
log(ss+1.e-40)+
log((1.0-ss)+1.e-40)+l4);
static int straight_through_flag
static void reset(const init_df1b2vector &, const df1b2variable &)
Description not yet available.
void allocate(void)
Description not yet available.
virtual void add_to_list(void)
Description not yet available.
int withinbound(int lb, int n, int ub)
df1b2variable & operator=(const df3_one_variable &v)
#define ADUNCONST(type, obj)
Creates a shallow copy of obj that is not CONST.
Vector of double precision numbers.
Description not yet available.
void fmin(double f, const independent_variables &x, const dvector &g, const int &n, const dvector &w, const dvector &h, const fmm_control &fmc)
Description not yet available.
Description not yet available.
df1_one_variable atan(const df1_one_variable &x)
d3_array sin(const d3_array &arr3)
Returns d3_array results with computed sin from elements in arr3.
void operator=(const df1b2variable &_x)
Description not yet available.
df1b2_init_number()
Description not yet available.
d3_array cube(const d3_array &m)
Description not yet available.
static initial_df1b2params ** varsptr
df1b2variable & operator()(int i) const
double mean(const dvector &vec)
Returns computed mean of vec.
Description not yet available.
static int num_initial_df1b2params
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
prnstream & endl(prnstream &)
void set_scalefactor(const double)
Set scale factor for parameter in RE model.
virtual void set_value(const init_df1b2vector &x, const int &_ii, const df1b2variable &pen)
Description not yet available.
double get_scalefactor()
Description not yet available.
void set_value(const dvar_matrix &x, const dvar_vector &v, const int &_ii, double s)
Description not yet available.
void set_phase_start(int n)
void set_value_mc(const dvar_vector &x, const dvar_vector &v, const int &ii, const double fmin, const double fmax)
Description not yet available.
re_df1b2_init_bounded_vector(void)
Description not yet available.
virtual void set_value(const init_df1b2vector &x, const int &_ii, const df1b2variable &pen)
Description not yet available.
static int have_bounded_random_effects
int active(const initial_params &ip)
void set_phase_start(int n)
virtual int & get_ind_index(void)
Description not yet available.
dvariable boundp(const prevariable &x, double fmin, double fmax, const prevariable &_fpen, double s)
Compute penalty for exceeding bounds on parameter; variable ojbects.
static int set_index(void)
Description not yet available.
dvector value(const df1_one_vector &v)
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
void allocate(void)
Initialize df1b2vector to empty.
double square(const double value)
Return square of value; constant object.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
virtual void set_value(const dvector &x, const int &_ii)
Description not yet available.
virtual void set_value(const dvector &, const int &ii)=0