15 #define ISZERO(d) ((d)==0.0)
62 #if defined(USE_SHARE_FLAGS)
78 #if defined(USE_SHARE_FLAGS)
148 cout << H << endl <<
endl;
158 #if defined(USE_SHARE_FLAGS)
170 #if defined(USE_SHARE_FLAGS)
232 # if defined(USE_SHARE_FLAGS)
245 # if defined(USE_SHARE_FLAGS)
323 _pen(ii-1)=
value(pen1);
351 # if defined(USE_SHARE_FLAGS)
361 (
varsptr[i])->set_value(x,ii,pen);
362 # if defined(USE_SHARE_FLAGS)
399 ofstream parfile((
char*)tadstring);
410 varsptr[i]->save_value(parfile);
484 int phz =
static_cast<int>(_v(3));
490 double _maxb,
int _phase_start,
const char * _s)
496 cerr <<
"Error allocating init_bounded_number " <<
endl
507 cerr <<
"error reading parameters from binary file "
517 cerr <<
"error reading parameters from file "
564 cerr <<
" Error trying to read in model data " <<
endl;
565 cerr <<
" This is usual caused by a missing DAT file " <<
endl;
638 cerr <<
"error reading parameters from binary file "
648 cerr <<
"error reading parameters from file "
699 # if defined(USE_SHARE_FLAGS)
705 cerr <<
"grouping flags dimension error" <<
endl;
716 # if defined(USE_SHARE_FLAGS)
781 cerr <<
"error reading parameters from binary file.\n";
790 cerr <<
"error reading parameters from file "
822 int _phase_start,
const char * s)
833 cerr <<
"error reading parameters from binary file "
843 cerr <<
"error reading parameters from file "
933 double _minb,
double _maxb,
int _phase_start,
const char * s)
946 cerr <<
"error reading parameters from binary file "
956 cerr <<
"error reading parameters from file "
978 double _minb,
double _maxb,
const char * s)
980 allocate(imin,imax,_minb,_maxb,1,s);
1057 const ivector& cmax,
const char * s)
1090 int cmin,
int cmax,
const char * s)
1113 int rmax,
int cmin,
int cmax,
const char * s)
1124 const ivector& rmax,
int cmin,
int cmax,
const char * s)
1135 const ivector& rmax,
int cmin,
int cmax,
const char * s)
1146 const ivector& cmin,
int cmax,
const char * s)
1157 int cmin,
const ivector& cmax,
const char * s)
1297 assert(static_cast<unsigned int>(i) <
current);
1300 unsigned int index =
static_cast<unsigned int>(i);
1326 cerr <<
"Error: allocating memory in adlist_ptr" <<
endl;
virtual void set_value(const dvar_vector &x, const int &ii, const dvariable &pen)
virtual void set_value(const dvar_vector &x, const int &ii, const dvariable &pen)
void allocate(void)
Does NOT allocate, but initializes empty d3_array.
dvar_vector()
Default constructor.
virtual void set_value(const dvar_vector &, const int &, const dvariable &pen)=0
d3_array elem_prod(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements product of a(i, j, k) * b(i, j, k).
virtual unsigned int size_count() const
Returns the number of active parameters.
static adstring user_par_file
index_type * get_shareflags(void)
Uses polymorphism to get index information from various data types to be used in constructing and all...
virtual unsigned int size_count() const =0
ivector()
Default constructor.
virtual void shared_set_value_inv(const dvector &, const int &)
void allocate(void)
Does not allocate, but initializes imatrix members.
param_init_bounded_vector()
Default constructor.
dvector()
Construct a dvector without allocating memory.
param_init_vector()
Default constructor.
virtual ~initial_params()
Destructor.
void allocate(const char *="UNNAMED")
static adstring user_data_file
virtual void set_value_inv(const dvector &x, const int &ii)
static void set_active_random_effects(void)
static void xinit1(const dvector &x, const dvector &g)
static int stddev_curvscale(const dvector &d, const dvector &x)
int withinbound(int lb, int n, int ub)
void allocate(void)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
adlist_ptr()
Default constructor.
void set_scalefactor(const double)
virtual void sd_vscale(const dvar_vector &d, const dvar_vector &x, const int &ii)=0
static int num_active_calc(void)
virtual void set_value(const dvar_vector &x, const int &ii, const dvariable &pen)
For storing void pointers in a array.
Description not yet available.
void allocate(double _minb, double _maxb, int phase_start=1, const char *s="UNNAMED")
Vector of double precision numbers.
virtual void bsave_value(uostream &uos)
pinitial_params & operator[](int i)
std::vector< void * > list
Description not yet available.
static int correct_for_dev_objects(const dmatrix &H)
static int max_num_initial_params
void allocate(void)
Does not allocate, but initializes dvar_vector to empty.
static uistream * global_bparfile
double get_initial_value(void)
virtual int shared_size_count(void)
d3_array elem_div(const d3_array &a, const d3_array &b)
Returns d3_array results with computed elements division of a(i, j, k) / b(i, j, k).
virtual void save_value(ofstream &ofs)
virtual void set_value_inv(const dvector &x, const int &ii)
void set_initial_value(double x)
void allocate(void)
Allocate dvector without allocating memory.
static dvariable reset(const dvar_vector &x)
virtual unsigned int size_count() const
Returns the number of active parameters.
virtual void set_value(const dvar_vector &x, const int &ii, const dvariable &pen)
virtual void save_value(const ofstream &ofs, int prec)
Write values of param_init_matrix into output stream _ofs.
Description not yet available.
static void restore_start_phase(void)
static adstring adprogram_name
param_init_bounded_number()
Default constructor.
virtual unsigned int size_count() const
Returns number of active paramters.
static dvariable reset1(const dvar_vector &x, const dvector &g)
dvariable()
Default constructor.
Description not yet available.
virtual void bsave_value(uostream &uos)
virtual void add_to_list(void)
void restore_phase_start(void)
d3_array(void)
Default constructor.
virtual void set_only_random_effects_active()
static int stddev_vscale(const dvar_vector &d, const dvar_vector &x)
Description not yet available.
virtual const char * label(void)
void allocate(const char *s)
virtual void dev_correction(const dmatrix &, const int &)=0
static adstring get_reportfile_name(void)
virtual void save_value(ofstream &ofs)
prnstream & endl(prnstream &)
Array of integers(int) with indexes from index_min to indexmax.
void check_datafile_pointer(void *p)
Exits if p is null.
static void set_active_only_random_effects(void)
virtual void bsave_value(uostream &uos)
static dvector maximum_function_evaluations
virtual void set_value_inv(const dvector &x, const int &ii)
static int max_number_phases
virtual unsigned int size_count() const
Returns the number of active parameters.
virtual void set_value_inv(const dvector &x, const int &ii)
Description not yet available.
int get_phase_start(void)
preshowpoint setshowpoint(void)
Description not yet available.
void allocate(void)
Does not allocate, but initializes members.
virtual void set_random_effects_inactive()
void add_to_list(void *)
Store pointer p to array.
virtual void save_value(const ofstream &ofs, int prec)
Write values of param_init_number into output stream _ofs.
static objective_function_value * pobjfun
Description not yet available.
void allocate(const char *s)
static void xinit(const dvector &x)
virtual void curv_scale(const dvector &d, const dvector &x, const int &ii)=0
Description not yet available.
double set_value_inv_mc(double v, double fmin, double fmax)
initial_params(void)
Default constructor.
void allocate(unsigned int init_size)
Construct array with init_size.
static void set_inactive_random_effects(void)
Description not yet available.
friend double & value(const prevariable &v1)
void set_value(const dvar_matrix &x, const dvar_vector &v, const int &_ii, double s)
Description not yet available.
static int num_initial_params
void set_value_mc(const dvar_vector &x, const dvar_vector &v, const int &ii, const double fmin, const double fmax)
void set_value_inv(const dvar_matrix &x, const dvector &v, const int &ii, double s)
Description not yet available.
static cifstream * global_datafile
virtual const char * label(void)
void set_inactive_flag(void)
adstring str(double x, int minwidth=17, int decplaces=-1)
Convert x to adstring with minimum width and total number of decimal places.
virtual void set_random_effects_active()
void allocate()
Does not allocate, but initializes class members.
virtual void set_only_random_effects_inactive()
adstring get_file_name(void)
void allocate(int _phase_start)
prevariable & operator=(const prevariable &)
Assigns a value to a prevariable object.
imatrix(void)
Default constructor.
dvar_matrix()
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
void set_active_flag(void)
void initialize()
Double array size if needed.
dvar_matrix & operator=(const dvar_matrix &)
Assigns other values to dvar_matrix.
void allocate(int phase_start=1, const char *s="UNNAMED")
int active(const initial_params &ip)
Class definition of matrix with derivitive information .
unsigned int size_count(const dvector &x)
Returns total size of elements in vector x.
data_number & operator=(const double &m)
virtual void set_value_inv(const dvector &, const int &)=0
virtual void bsave_value(uostream &uos)
virtual const char * label(void)
dvar_vector & operator=(const dvar_vector &t)
Assign values from other t to dvar_vector.
void set_phase_start(int x)
void allocate(int n, const char *s="UNNAMED")
dvector value(const df1_one_vector &v)
static cifstream * global_parfile
static int stddev_scale(const dvector &d, const dvector &x)
virtual const char * label(void)
virtual void bsave_value(uostream &uos)=0
virtual void sd_scale(const dvector &d, const dvector &x, const int &ii)=0
static dvector convergence_criteria
virtual void shared_set_value(const dvar_vector &, const int &, const dvariable &pen)
Fundamental data type for reverse mode automatic differentiation.
Description not yet available.
virtual void set_value(const dvar_vector &x, const int &ii, const dvariable &pen)
Description not yet available.
static void set_inactive_only_random_effects(void)
static adlist_ptr varsptr
virtual void set_value_inv(const dvector &x, const int &ii)
unsigned int current_size