ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
initial_params Class Referenceabstract

Description not yet available. More...

#include <admodel.h>

Public Member Functions

 initial_params (void)
 Default constructor. More...
 
virtual void add_to_list (void)
 
virtual void add_value (const dvector &, const int &)=0
 
virtual void add_value (const dvector &, const dvector &, const int &, const double &, const dvector &)=0
 
void allocate (int _phase_start)
 
virtual void bsave_value (uostream &uos)=0
 
virtual void copy_value_to_vector (const dvector &, const int &)=0
 
virtual void curv_scale (const dvector &d, const dvector &x, const int &ii)=0
 
virtual void dev_correction (const dmatrix &, const int &)=0
 
double get_initial_value (void)
 
virtual void get_jacobian (const dvector &, const dvector &, const int &)=0
 
int get_phase_start (void)
 
double get_scalefactor ()
 
virtual void hess_scale (const dvector &d, const dvector &x, const int &ii)=0
 
virtual const char * label ()=0
 
virtual void mc_scale (const dvector &d, const dvector &x, const int &ii)=0
 
virtual void pvm_pack (void)=0
 
virtual void pvm_unpack (void)=0
 
void restore_phase_start (void)
 
virtual void restore_value (const ifstream &ifs)=0
 
virtual void restore_value_from_vector (const dvector &, const int &)=0
 
virtual void save_value (ofstream &ofs)=0
 
virtual void save_value (const ofstream &ofs, int prec)=0
 
virtual void save_value (const ofstream &ofs, int prec, const dvector &, int &offset)=0
 
virtual void sd_scale (const dvector &d, const dvector &x, const int &ii)=0
 
virtual void sd_vscale (const dvar_vector &d, const dvar_vector &x, const int &ii)=0
 
void set_active_flag (void)
 
void set_inactive_flag (void)
 
void set_initial_value (double x)
 
virtual void set_only_random_effects_active ()
 
virtual void set_only_random_effects_inactive ()
 
void set_phase_start (int x)
 
virtual void set_random_effects_active ()
 
virtual void set_random_effects_inactive ()
 
void set_scalefactor (const double)
 
virtual void set_simulation_bounds (const dmatrix &symbds, const int &ii)=0
 
virtual void set_value (const dvar_vector &, const int &, const dvariable &pen)=0
 
virtual void set_value_inv (const dvector &, const int &)=0
 
virtual void setshare (const index_type &sf, const index_type &af)
 
virtual void shared_set_value (const dvar_vector &, const int &, const dvariable &pen)
 
virtual void shared_set_value_inv (const dvector &, const int &)
 
virtual int shared_size_count (void)
 
virtual unsigned int size_count () const =0
 

Static Public Member Functions

static void add_random_vector (const dvector &x)
 Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California. More...
 
static void add_random_vector (const dvector &y, const dvector &x, const double &ll, const dvector &diag)
 
static void copy_all_values (const dvector &x, const int &ii)
 
static int correct_for_dev_objects (const dmatrix &H)
 
static void get_jacobian_value (const dvector &y, const dvector &jac)
 
static adstring get_reportfile_name (void)
 
static int montecarlo_scale (const dvector &d, const dvector &x)
 Description not yet available. More...
 
static int num_active_calc (void)
 
static int nvarcalc ()
 
static int nvarcalc_all (void)
 Description not yet available. More...
 
static void read (void)
 
static dvariable reset (const dvar_vector &x)
 
static dvariable reset (const dvector &x)
 
static dvariable reset (const dvar_vector &x, const dvector &pen)
 
static dvariable reset1 (const dvar_vector &x, const dvector &g)
 
static dvariable reset_all (const dvar_vector &x, const dvector &pen)
 Description not yet available. More...
 
static void restore (const ifstream &ifs)
 
static void restore_all_values (const dvector &x, const int &ii)
 
static void restore_start_phase (void)
 
static void save (void)
 
static void save (const ofstream &ofs, int prec)
 Author: David Fournier Copyright (c) 2008-2014 Regents of the University of California. More...
 
static void save_all (const ofstream &_ofs, int prec, const dvector &g)
 Write all values of g into output stream _ofs. More...
 
static void set_active_only_random_effects (void)
 
static void set_active_random_effects (void)
 
static void set_all_simulation_bounds (const dmatrix &symbds)
 
static void set_all_simulation_bounds (const dmatrix &symbds, const dvector &)
 
static void set_inactive_only_random_effects (void)
 
static void set_inactive_random_effects (void)
 
static int stddev_curvscale (const dvector &d, const dvector &x)
 
static int stddev_scale (const dvector &d, const dvector &x)
 
static int stddev_vscale (const dvar_vector &d, const dvar_vector &x)
 
static void xinit (const dvector &x)
 
static void xinit1 (const dvector &x, const dvector &g)
 
static void xinit_all (const dvector &x)
 Description not yet available. More...
 

Public Attributes

int phase_save
 
int phase_start
 
int phase_stop
 

Static Public Attributes

static int current_phase =1
 
static bool in_hessian_phase = false
 
static int max_num_initial_params = 0
 
static int max_number_phases =1
 
static int mc_phase =0
 
static int mceval_phase =0
 
static int num_active_initial_params
 
static int num_initial_params = 0
 
static int restart_phase =0
 
static int sd_phase =0
 
static int straight_through_flag =0
 
static adlist_ptr varsptr
 

Protected Member Functions

virtual ~initial_params ()
 Destructor. More...
 

Protected Attributes

int active_flag
 
double initial_value
 
int initial_value_flag
 
double scalefactor
 
shareinfoshare_flags
 

Friends

int active (const initial_params &ip)
 
class function_minimizer
 

Detailed Description

Description not yet available.

Parameters

Definition at line 814 of file admodel.h.

Constructor & Destructor Documentation

initial_params::~initial_params ( )
protectedvirtual

Destructor.

Definition at line 56 of file model.cpp.

initial_params::initial_params ( void  )

Default constructor.

Definition at line 76 of file model.cpp.

Member Function Documentation

void initial_params::add_random_vector ( const dvector x)
static

Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.

Definition at line 7 of file mod_mc1.cpp.

Referenced by function_minimizer::mcmc_routine(), function_minimizer::monte_carlo_routine(), and function_minimizer::rwm_mcmc_routine().

void initial_params::add_random_vector ( const dvector y,
const dvector x,
const double &  ll,
const dvector diag 
)
static

Definition at line 9 of file mod_mc3.cpp.

void initial_params::add_to_list ( void  )
virtual

Definition at line 129 of file model.cpp.

Referenced by allocate().

virtual void initial_params::add_value ( const dvector ,
const int &   
)
pure virtual
virtual void initial_params::add_value ( const dvector ,
const dvector ,
const int &  ,
const double &  ,
const dvector  
)
pure virtual
void initial_params::allocate ( int  _phase_start)
virtual void initial_params::bsave_value ( uostream uos)
pure virtual
void initial_params::copy_all_values ( const dvector x,
const int &  ii 
)
static
virtual void initial_params::copy_value_to_vector ( const dvector ,
const int &   
)
pure virtual
int initial_params::correct_for_dev_objects ( const dmatrix H)
static

Definition at line 137 of file model.cpp.

virtual void initial_params::curv_scale ( const dvector d,
const dvector x,
const int &  ii 
)
pure virtual
virtual void initial_params::dev_correction ( const dmatrix ,
const int &   
)
pure virtual
double initial_params::get_initial_value ( void  )

Definition at line 96 of file model.cpp.

virtual void initial_params::get_jacobian ( const dvector ,
const dvector ,
const int &   
)
pure virtual
void initial_params::get_jacobian_value ( const dvector y,
const dvector jac 
)
static

Definition at line 21 of file mod_mc3.cpp.

int initial_params::get_phase_start ( void  )

Definition at line 107 of file model.cpp.

adstring initial_params::get_reportfile_name ( void  )
static

Definition at line 1267 of file model.cpp.

double initial_params::get_scalefactor ( void  )

Definition at line 30 of file model.cpp.

virtual void initial_params::hess_scale ( const dvector d,
const dvector x,
const int &  ii 
)
pure virtual
virtual const char* initial_params::label ( )
pure virtual
virtual void initial_params::mc_scale ( const dvector d,
const dvector x,
const int &  ii 
)
pure virtual
int initial_params::montecarlo_scale ( const dvector d,
const dvector x 
)
static

Description not yet available.

Parameters

Definition at line 15 of file mc_scale.cpp.

Referenced by function_minimizer::monte_carlo_routine().

int initial_params::num_active_calc ( void  )
static

Definition at line 177 of file model.cpp.

Referenced by function_minimizer::sd_routine().

int initial_params::nvarcalc ( )
static

Definition at line 152 of file model.cpp.

Referenced by calculate_importance_sample(), calculate_importance_sample_block_diagonal(), calculate_importance_sample_block_diagonal_funnel(), calculate_importance_sample_block_diagonal_option2(), calculate_importance_sample_block_diagonal_option_antithetical(), calculate_importance_sample_funnel(), calculate_importance_sample_shess(), calculate_laplace_approximation(), check_for_params_on_bounds(), laplace_approximation_calculator::default_calculations(), function_minimizer::dep_hess_routine(), function_minimizer::depvars_routine(), do_gauss_hermite_block_diagonal(), do_gauss_hermite_block_diagonal_multi(), laplace_approximation_calculator::do_one_feval(), evaluate_function(), evaluate_function_gradient(), evaluate_function_no_derivatives(), evaluate_function_quiet(), evaluate_function_with_quadprior(), fmmt1::fmin2(), get_param_names(), function_minimizer::hess_determinant(), function_minimizer::hess_inv(), function_minimizer::hess_routine_and_constraint(), function_minimizer::hess_routine_noparallel(), function_minimizer::hess_routine_noparallel_random_effects(), function_minimizer::hess_routine_slave_random_effects(), function_minimizer::hess_step(), function_minimizer::hybrid_mcmc_routine(), function_minimizer::likeprof_routine(), function_minimizer::limited_memory_quasi_newton(), function_minimizer::limited_memory_quasi_newton_block(), function_minimizer::mcmc_eval(), function_minimizer::mcmc_routine(), function_minimizer::minimize(), function_minimizer::monte_carlo_routine(), function_minimizer::normalize_posterior_distribution(), function_minimizer::nuts_mcmc_routine(), function_minimizer::prof_minimize(), function_minimizer::prof_minimize_re(), function_minimizer::projected_hess_determinant(), function_minimizer::quasi_newton_block(), function_minimizer::rwm_mcmc_routine(), save(), function_minimizer::sd_routine(), function_minimizer::shmc_mcmc_routine(), function_minimizer::trust_region_update(), and function_minimizer::unrestricted_hess_determinant().

int initial_params::nvarcalc_all ( void  )
static
virtual void initial_params::pvm_pack ( void  )
pure virtual
virtual void initial_params::pvm_unpack ( void  )
pure virtual
static void initial_params::read ( void  )
static
dvariable initial_params::reset ( const dvar_vector x)
static

Definition at line 345 of file model.cpp.

Referenced by function_minimizer::adamoeba(), function_minimizer::amxxx(), laplace_approximation_calculator::banded_calculations(), laplace_approximation_calculator::banded_calculations_lme(), laplace_approximation_calculator::block_diagonal_calculations(), calculate_importance_sample(), calculate_importance_sample_block_diagonal(), calculate_importance_sample_block_diagonal_funnel(), calculate_importance_sample_block_diagonal_option2(), calculate_importance_sample_block_diagonal_option_antithetical(), calculate_importance_sample_funnel(), calculate_importance_sample_shess(), calculate_laplace_approximation(), laplace_approximation_calculator::default_calculations(), laplace_approximation_calculator::default_calculations_check_derivatives(), function_minimizer::dep_hess_routine(), function_minimizer::depvars_routine(), do_evaluation(), do_gauss_hermite_block_diagonal(), do_gauss_hermite_block_diagonal_multi(), laplace_approximation_calculator::do_one_feval(), evaluate_function(), evaluate_function_gradient(), evaluate_function_no_derivatives(), evaluate_function_quiet(), evaluate_function_with_quadprior(), laplace_approximation_calculator::get_fx_fu(), laplace_approximation_calculator::get_gradient_lme(), laplace_approximation_calculator::get_gradient_lme_hp(), laplace_approximation_calculator::get_hessian_from_components_lme(), function_minimizer::get_hybrid_monte_carlo_value(), function_minimizer::get_monte_carlo_value(), function_minimizer::get_particular_grad(), laplace_approximation_calculator::get_uhat_lm_newton2(), laplace_approximation_calculator::get_uhat_quasi_newton(), laplace_approximation_calculator::get_uhat_quasi_newton_block_diagonal(), function_minimizer::hess_routine_and_constraint(), function_minimizer::hess_routine_noparallel(), function_minimizer::hess_routine_slave_random_effects(), function_minimizer::hess_step(), function_minimizer::hybrid_mcmc_routine(), function_minimizer::limited_memory_quasi_newton(), function_minimizer::limited_memory_quasi_newton_block(), function_minimizer::mcmc_routine(), function_minimizer::minimize(), function_minimizer::neldmead(), function_minimizer::nuts_mcmc_routine(), function_minimizer::prof_minimize(), function_minimizer::prof_minimize_re(), function_minimizer::pvm_master_get_monte_carlo_value(), function_minimizer::pvm_slave_get_monte_carlo_value(), function_minimizer::quasi_newton_block(), function_minimizer::rwm_mcmc_routine(), function_minimizer::set_initial_simplex(), and laplace_approximation_calculator::test_trust_region_method().

dvariable initial_params::reset ( const dvector x)
static

Definition at line 369 of file model.cpp.

dvariable initial_params::reset ( const dvar_vector x,
const dvector pen 
)
static

Definition at line 312 of file model.cpp.

dvariable initial_params::reset1 ( const dvar_vector x,
const dvector g 
)
static

Definition at line 330 of file model.cpp.

dvariable initial_params::reset_all ( const dvar_vector x,
const dvector __pen 
)
static

Description not yet available.

Parameters

Definition at line 45 of file nvarcall.cpp.

void initial_params::restore ( const ifstream &  ifs)
static

Definition at line 9 of file model13.cpp.

void initial_params::restore_all_values ( const dvector x,
const int &  ii 
)
static
void initial_params::restore_phase_start ( void  )

Definition at line 283 of file model.cpp.

Referenced by restore_start_phase().

void initial_params::restore_start_phase ( void  )
static
virtual void initial_params::restore_value ( const ifstream &  ifs)
pure virtual
virtual void initial_params::restore_value_from_vector ( const dvector ,
const int &   
)
pure virtual
void initial_params::save ( void  )
static

Definition at line 382 of file model.cpp.

Referenced by function_minimizer::minimize().

void initial_params::save ( const ofstream &  _ofs,
int  precision 
)
static

Author: David Fournier Copyright (c) 2008-2014 Regents of the University of California.

Write values of param_init_number into output stream _ofs.

Parameters
_ofsoutput stream
precisionsets the floating point precision

Definition at line 13 of file model12.cpp.

void initial_params::save_all ( const ofstream &  _ofs,
int  precision,
const dvector g 
)
static

Write all values of g into output stream _ofs.

Note:** precision is hardcoded to 6.

Parameters
_ofsoutput stream
precisionsets the floating point precision
gthe data to output

Definition at line 161 of file model12.cpp.

virtual void initial_params::save_value ( ofstream &  ofs)
pure virtual
virtual void initial_params::save_value ( const ofstream &  ofs,
int  prec 
)
pure virtual
virtual void initial_params::save_value ( const ofstream &  ofs,
int  prec,
const dvector ,
int &  offset 
)
pure virtual
virtual void initial_params::sd_scale ( const dvector d,
const dvector x,
const int &  ii 
)
pure virtual
virtual void initial_params::sd_vscale ( const dvar_vector d,
const dvar_vector x,
const int &  ii 
)
pure virtual
void initial_params::set_active_flag ( void  )

Definition at line 427 of file model.cpp.

Referenced by xinit(), and xinit1().

void initial_params::set_active_only_random_effects ( void  )
static
void initial_params::set_active_random_effects ( void  )
static
void initial_params::set_all_simulation_bounds ( const dmatrix symbds)
static
static void initial_params::set_all_simulation_bounds ( const dmatrix symbds,
const dvector  
)
static
void initial_params::set_inactive_flag ( void  )

Definition at line 432 of file model.cpp.

void initial_params::set_inactive_only_random_effects ( void  )
static
void initial_params::set_inactive_random_effects ( void  )
static
void initial_params::set_initial_value ( double  x)
void initial_params::set_only_random_effects_active ( void  )
virtual
void initial_params::set_only_random_effects_inactive ( void  )
virtual
void initial_params::set_phase_start ( int  x)

Definition at line 101 of file model.cpp.

void initial_params::set_random_effects_active ( void  )
virtual
void initial_params::set_random_effects_inactive ( void  )
virtual
void initial_params::set_scalefactor ( const double  sf)

Definition at line 34 of file model.cpp.

virtual void initial_params::set_simulation_bounds ( const dmatrix symbds,
const int &  ii 
)
pure virtual
virtual void initial_params::set_value ( const dvar_vector ,
const int &  ,
const dvariable pen 
)
pure virtual
virtual void initial_params::set_value_inv ( const dvector ,
const int &   
)
pure virtual
void initial_params::setshare ( const index_type sf,
const index_type af 
)
virtual

Reimplemented in param_init_d3array, param_init_matrix, and param_init_vector.

Definition at line 173 of file shared.cpp.

void initial_params::shared_set_value ( const dvar_vector x,
const int &  ii,
const dvariable pen 
)
virtual

Reimplemented in param_init_d3array, param_init_bounded_matrix, param_init_matrix, and param_init_vector.

Definition at line 23 of file shared.cpp.

Referenced by reset().

void initial_params::shared_set_value_inv ( const dvector x,
const int &  ii 
)
virtual

Reimplemented in param_init_d3array, param_init_bounded_matrix, param_init_matrix, and param_init_vector.

Definition at line 31 of file shared.cpp.

Referenced by xinit().

int initial_params::shared_size_count ( void  )
virtual

Reimplemented in param_init_d3array, param_init_matrix, and param_init_vector.

Definition at line 15 of file shared.cpp.

Referenced by nvarcalc().

virtual unsigned int initial_params::size_count ( ) const
pure virtual
int initial_params::stddev_curvscale ( const dvector d,
const dvector x 
)
static
int initial_params::stddev_scale ( const dvector d,
const dvector x 
)
static
int initial_params::stddev_vscale ( const dvar_vector d,
const dvar_vector x 
)
static
void initial_params::xinit ( const dvector x)
static

Definition at line 226 of file model.cpp.

Referenced by laplace_approximation_calculator::banded_calculations(), calculate_importance_sample(), calculate_importance_sample_block_diagonal(), calculate_importance_sample_block_diagonal_funnel(), calculate_importance_sample_block_diagonal_option2(), calculate_importance_sample_block_diagonal_option_antithetical(), calculate_importance_sample_funnel(), calculate_importance_sample_shess(), calculate_laplace_approximation(), laplace_approximation_calculator::default_calculations_check_derivatives(), function_minimizer::dep_hess_routine(), function_minimizer::depvars_routine(), do_gauss_hermite_block_diagonal(), do_gauss_hermite_block_diagonal_multi(), fmmt1::fmin2(), laplace_approximation_calculator::get_fx_fu(), laplace_approximation_calculator::get_gradient_lme(), laplace_approximation_calculator::get_gradient_lme_hp(), laplace_approximation_calculator::get_hessian_from_components_lme(), function_minimizer::get_particular_grad(), laplace_approximation_calculator::get_uhat_lm_newton(), laplace_approximation_calculator::get_uhat_lm_newton2(), laplace_approximation_calculator::get_uhat_quasi_newton(), laplace_approximation_calculator::get_uhat_quasi_newton_block_diagonal(), laplace_approximation_calculator::get_uhat_quasi_newton_qd(), function_minimizer::hess_inv(), function_minimizer::hess_routine_and_constraint(), function_minimizer::hess_routine_noparallel(), function_minimizer::hess_routine_noparallel_random_effects(), function_minimizer::hess_routine_slave_random_effects(), function_minimizer::hess_step(), function_minimizer::hybrid_mcmc_routine(), function_minimizer::likeprof_routine(), function_minimizer::mcmc_eval(), function_minimizer::mcmc_routine(), function_minimizer::minimize(), function_minimizer::monte_carlo_routine(), function_minimizer::nuts_mcmc_routine(), function_minimizer::prof_minimize(), function_minimizer::prof_minimize_re(), function_minimizer::rwm_mcmc_routine(), function_minimizer::sd_routine(), and function_minimizer::shmc_mcmc_routine().

void initial_params::xinit1 ( const dvector x,
const dvector g 
)
static

Definition at line 296 of file model.cpp.

void initial_params::xinit_all ( const dvector _x)
static

Friends And Related Function Documentation

int active ( const initial_params ip)
friend

Definition at line 437 of file model.cpp.

friend class function_minimizer
friend

Definition at line 954 of file admodel.h.

Member Data Documentation

int initial_params::active_flag
protected

Definition at line 821 of file admodel.h.

Referenced by active(), initial_params(), set_active_flag(), and set_inactive_flag().

int initial_params::current_phase =1
static
bool initial_params::in_hessian_phase = false
static

Definition at line 845 of file admodel.h.

Referenced by function_minimizer::hess_routine().

double initial_params::initial_value
protected
int initial_params::initial_value_flag
protected
int initial_params::max_num_initial_params = 0
static

Definition at line 837 of file admodel.h.

Referenced by function_minimizer::function_minimizer().

int initial_params::max_number_phases =1
static
int initial_params::mc_phase =0
static
int initial_params::mceval_phase =0
static

Definition at line 847 of file admodel.h.

Referenced by ad_make_code_reentrant(), and function_minimizer::computations().

int initial_params::num_active_initial_params
static

Definition at line 840 of file admodel.h.

int initial_params::num_initial_params = 0
static
int initial_params::phase_save
int initial_params::phase_start

Definition at line 848 of file admodel.h.

Referenced by add_random_vector(), allocate(), check_for_params_on_bounds(), copy_all_values(), correct_for_dev_objects(), get_jacobian_value(), get_param_names(), get_phase_start(), initial_params(), montecarlo_scale(), num_active_calc(), nvarcalc(), reset(), reset1(), restore_all_values(), restore_phase_start(), save_all(), set_all_simulation_bounds(), random_effects_number::set_only_random_effects_active(), random_effects_bounded_number::set_only_random_effects_active(), random_effects_vector::set_only_random_effects_active(), random_effects_bounded_vector::set_only_random_effects_active(), random_effects_matrix::set_only_random_effects_active(), random_effects_bounded_matrix::set_only_random_effects_active(), set_only_random_effects_active(), random_effects_number::set_only_random_effects_inactive(), random_effects_bounded_number::set_only_random_effects_inactive(), random_effects_vector::set_only_random_effects_inactive(), random_effects_bounded_vector::set_only_random_effects_inactive(), random_effects_matrix::set_only_random_effects_inactive(), random_effects_bounded_matrix::set_only_random_effects_inactive(), set_only_random_effects_inactive(), set_phase_start(), random_effects_number::set_random_effects_active(), random_effects_bounded_number::set_random_effects_active(), random_effects_vector::set_random_effects_active(), random_effects_bounded_vector::set_random_effects_active(), random_effects_matrix::set_random_effects_active(), random_effects_bounded_matrix::set_random_effects_active(), random_effects_number::set_random_effects_inactive(), random_effects_bounded_number::set_random_effects_inactive(), random_effects_vector::set_random_effects_inactive(), random_effects_bounded_vector::set_random_effects_inactive(), random_effects_matrix::set_random_effects_inactive(), random_effects_bounded_matrix::set_random_effects_inactive(), stddev_curvscale(), stddev_scale(), stddev_vscale(), xinit(), and xinit1().

int initial_params::phase_stop

Definition at line 850 of file admodel.h.

int initial_params::restart_phase =0
static

Definition at line 843 of file admodel.h.

Referenced by function_minimizer::minimize().

double initial_params::scalefactor
protected
int initial_params::sd_phase =0
static

Definition at line 844 of file admodel.h.

Referenced by ad_make_code_reentrant(), and function_minimizer::computations1().

shareinfo* initial_params::share_flags
protected
int initial_params::straight_through_flag =0
static
adlist_ptr initial_params::varsptr
static

The documentation for this class was generated from the following files: