KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Annealing_sampler< Model > Class Template Reference

#include <sample_annealing.h>

Inheritance diagram for Annealing_sampler< Model >:
Multi_step_sampler< Model > Abstract_sampler< Model >

Public Member Functions

 Annealing_sampler (const Model &initial_state, double initial_log_target)
 
template<class StepType >
void add_annealing_step (const StepType &step, double prob, const std::string &name="")
 
template<class StepType >
void add_annealing_step (StepType *step, double prob, const std::string &name="")
 
template<class StepType >
void add_annealing_step (const boost::shared_ptr< StepType > &step, double prob, const std::string &name="")
 
void add_temperature_changed_callback (const boost::function1< void, double > &cb)
 Add an arbitrary function to be called when temperature changes. More...
 
void set_temperature (double temperature)
 
- Public Member Functions inherited from Multi_step_sampler< Model >
 BOOST_CONCEPT_ASSERT ((BaseModel< Model >))
 
 Multi_step_sampler (const Model &initial_state, double initial_log_target)
 
template<class StepType >
 Multi_step_sampler (const StepType &st, const Model &initial_state, double initial_log_target)
 
 Multi_step_sampler (const std::vector< Step > &step_list, const std::vector< double > &prob_list, const Model &initial_state, double initial_log_target)
 
template<class StepType >
void add_step (const StepType &step, double prob, const std::string &name="")
 Add a new step with associated probability. This does NOT make sure probabilities add up to 1. It is up to the user to do that. More...
 
template<class StepType >
void add_step (StepType *step, double prob, const std::string &name="")
 Add a new step with associated probability. This does NOT make sure probabilities add up to 1. It is up to the user to do that. More...
 
template<class StepType >
void add_step (const boost::shared_ptr< StepType > &step, double prob, const std::string &name="")
 Add a new step with associated probability. This does NOT make sure probabilities add up to 1. It is up to the user to do that. More...
 
template<class StepType >
const StepType & get_step (size_t i) const
 
- Public Member Functions inherited from Abstract_sampler< Model >
 Abstract_sampler (const Model &initial_state, double initial_log_target)
 
 BOOST_CONCEPT_ASSERT ((BaseModel< Model >))
 
virtual void run (int num_iterations)
 Runs the sampler. This function runs the sampler for the indicated number of iterations. At each iteration it chooses a sampler step using choose_step() and invokes it using its operator(). The best model is saved and returned. More...
 
Model & current_state ()
 
const Model & current_state () const
 
double current_log_target () const
 
template<class Recorder >
void add_recorder (Recorder r)
 
template<class Recorder >
void add_recorder (Recorder *r)
 
template<class Callback >
void add_record_callback (Callback cb)
 
template<class Recorder >
const Recorder & get_recorder (size_t i) const
 
void if_accept (const Callback &cb)
 
void if_reject (const Callback &cb)
 
void on_accept (const Callback &cb)
 
void on_reject (const Callback &cb)
 

Additional Inherited Members

- Public Types inherited from Multi_step_sampler< Model >
typedef Abstract_sampler< Model > Parent
 
typedef Abstract_sampler
< Model >::Step 
Step
 
- Public Types inherited from Abstract_sampler< Model >
typedef Sampler_step< Model >::Type Step
 
typedef Model Model_type
 
- Protected Member Functions inherited from Multi_step_sampler< Model >
virtual const Stepchoose_step () const
 Chooses a sampler step. Pure virtual method, should be overwritten. More...
 

Constructor & Destructor Documentation

template<class Model >
Annealing_sampler< Model >::Annealing_sampler ( const Model &  initial_state,
double  initial_log_target 
)
inline
Parameters
initial_stateModel to initialize the sampler with
initial_log_targetLog of the value of the initial_state under the target distribution

Member Function Documentation

template<class Model >
template<class StepType >
void Annealing_sampler< Model >::add_annealing_step ( const StepType &  step,
double  prob,
const std::string &  name = "" 
)
inline
template<class Model >
template<class StepType >
void Annealing_sampler< Model >::add_annealing_step ( StepType *  step,
double  prob,
const std::string &  name = "" 
)
inline
template<class Model >
template<class StepType >
void Annealing_sampler< Model >::add_annealing_step ( const boost::shared_ptr< StepType > &  step,
double  prob,
const std::string &  name = "" 
)
inline
template<class Model >
void Annealing_sampler< Model >::add_temperature_changed_callback ( const boost::function1< void, double > &  cb)
inline

Add an arbitrary function to be called when temperature changes.

template<class Model >
void Annealing_sampler< Model >::set_temperature ( double  temperature)
inline

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