|
vSMC
v3.0.0
Scalable Monte Carlo
|
#include <vsmc/core/sampler.hpp>
Public Types | |
| using | eval_type = std::function< std::size_t(std::size_t, Particle< T > &)> |
| using | size_type = typename Particle< T >::size_type |
Public Member Functions | |
| template<typename... Args> | |
| Sampler (Args &&...args) | |
| Construct a Sampler. More... | |
| Sampler< T > | clone () const |
| Clone the Sampler except the RNG engines. More... | |
| double | ess_history (std::size_t iter) const |
| Get ESS of a given iteration, (initialization count as iter zero) More... | |
| Sampler< T > & | eval (const eval_type &new_eval, SamplerStage stage, bool append=true) |
| Add a new evaluation object. More... | |
| Sampler< T > & | initialize () |
| Initialization. More... | |
| std::size_t | iter_num () const |
| Current iteration number (initialization count as zero) More... | |
| std::size_t | iter_size () const |
| Number of iterations (including initialization) More... | |
| Sampler< T > & | iterate (std::size_t num=1) |
| Iteration. More... | |
| Sampler< T > & | monitor (const std::string &name, const Monitor< T > &mon) |
| Add a monitor. More... | |
| Monitor< T > & | monitor (const std::string &name) |
| Read and write access to a named monitor. More... | |
| const Monitor< T > & | monitor (const std::string &name) const |
| Read only access to a named monitor. More... | |
| bool | monitor_clear (const std::string &name) |
| Erase a named monitor. More... | |
| Sampler< T > & | monitor_clear () |
| Erase all monitors. More... | |
| Particle< T > & | particle () |
| Read and write access to the Particle<T> object. More... | |
| const Particle< T > & | particle () const |
| Read only access to the Particle<T> object. More... | |
| template<typename CharT , typename Traits > | |
| std::basic_ostream< CharT, Traits > & | print (std::basic_ostream< CharT, Traits > &os, char sepchar= '\t') const |
| Print the history of the Sampler. More... | |
| template<typename OutputIter > | |
| OutputIter | read_ess_history (OutputIter first) const |
| Read ESS history through an output iterator. More... | |
| template<typename OutputIter > | |
| OutputIter | read_resampled_history (OutputIter first) const |
| Read resampling indicator history through an output iterator. More... | |
| template<typename OutputIter > | |
| OutputIter | read_size_history (OutputIter first) const |
| Read sampler size history through an output iterator. More... | |
| Sampler< T > & | resample_method (ResampleScheme scheme, double threshold=resample_threshold_always()) |
| Set resampling method by a built-in ResampleScheme scheme name. More... | |
| Sampler< T > & | resample_method (const eval_type &res_eval, double threshold=resample_threshold_always()) |
Set resampling method by a eval_type object. More... | |
| double | resample_threshold () const |
| Get resampling threshold. More... | |
| Sampler< T > & | resample_threshold (double threshold) |
| Set resampling threshold. More... | |
| bool | resampled_history (std::size_t iter) const |
| Get resampling indicator of a given iteration. More... | |
| void | reserve (std::size_t num) |
| Reserve space for a specified number of iterations. More... | |
| size_type | size () const |
| Number of particles. More... | |
| size_type | size_history (std::size_t iter) const |
| Get sampler size of a given iteration (initialization count as iteration zero) More... | |
| std::size_t | status_history (std::size_t iter, std::size_t id) const |
| Get the status of a given move id and the iteration. More... | |
| std::map< std::string, Vector< double > > | summary () const |
| Summary of sampler history. More... | |
Static Public Member Functions | |
| static double | resample_threshold_always () |
| Special value of resampling threshold that indicate no resampling will always be performed. More... | |
| static double | resample_threshold_never () |
| Special value of resampling threshold that indicate no resampling will be ever performed. More... | |
SMC Sampler.
Definition at line 99 of file sampler.hpp.
| using vsmc::Sampler< T >::eval_type = std::function<std::size_t(std::size_t, Particle<T> &)> |
Definition at line 103 of file sampler.hpp.
| using vsmc::Sampler< T >::size_type = typename Particle<T>::size_type |
Definition at line 102 of file sampler.hpp.
|
inlineexplicit |
Construct a Sampler.
All arguments are passed to the constructor of Particle
Definition at line 110 of file sampler.hpp.
|
inline |
Clone the Sampler except the RNG engines.
Definition at line 118 of file sampler.hpp.
|
inline |
Get ESS of a given iteration, (initialization count as iter zero)
Definition at line 311 of file sampler.hpp.
|
inline |
Add a new evaluation object.
Definition at line 149 of file sampler.hpp.
|
inline |
Initialization.
Definition at line 271 of file sampler.hpp.
|
inline |
Current iteration number (initialization count as zero)
Definition at line 146 of file sampler.hpp.
|
inline |
Number of iterations (including initialization)
Definition at line 143 of file sampler.hpp.
|
inline |
Iteration.
Definition at line 279 of file sampler.hpp.
|
inline |
Add a monitor.
| name | The name of the monitor |
| mon | The new monitor to be added |
Definition at line 227 of file sampler.hpp.
|
inline |
Read and write access to a named monitor.
Definition at line 235 of file sampler.hpp.
|
inline |
Read only access to a named monitor.
Definition at line 245 of file sampler.hpp.
|
inline |
Erase a named monitor.
Definition at line 256 of file sampler.hpp.
|
inline |
Erase all monitors.
Definition at line 263 of file sampler.hpp.
|
inline |
Read and write access to the Particle<T> object.
Definition at line 290 of file sampler.hpp.
|
inline |
Read only access to the Particle<T> object.
Definition at line 293 of file sampler.hpp.
|
inline |
Print the history of the Sampler.
| os | The ostream to which the contents are printed |
| sepchar | The seperator of fields |
Definition at line 398 of file sampler.hpp.
|
inline |
Read ESS history through an output iterator.
Definition at line 315 of file sampler.hpp.
|
inline |
Read resampling indicator history through an output iterator.
Definition at line 328 of file sampler.hpp.
|
inline |
Read sampler size history through an output iterator.
Definition at line 304 of file sampler.hpp.
|
inline |
Set resampling method by a built-in ResampleScheme scheme name.
Definition at line 161 of file sampler.hpp.
|
inline |
Set resampling method by a eval_type object.
Definition at line 190 of file sampler.hpp.
|
inline |
Get resampling threshold.
Definition at line 200 of file sampler.hpp.
|
inline |
Set resampling threshold.
Definition at line 203 of file sampler.hpp.
|
inlinestatic |
Special value of resampling threshold that indicate no resampling will always be performed.
Definition at line 218 of file sampler.hpp.
|
inlinestatic |
Special value of resampling threshold that indicate no resampling will be ever performed.
Definition at line 211 of file sampler.hpp.
|
inline |
Get resampling indicator of a given iteration.
Definition at line 321 of file sampler.hpp.
|
inline |
Reserve space for a specified number of iterations.
Definition at line 131 of file sampler.hpp.
|
inline |
Number of particles.
Definition at line 128 of file sampler.hpp.
|
inline |
Get sampler size of a given iteration (initialization count as iteration zero)
Definition at line 297 of file sampler.hpp.
|
inline |
Get the status of a given move id and the iteration.
Definition at line 335 of file sampler.hpp.
|
inline |
Summary of sampler history.
Definition at line 341 of file sampler.hpp.
1.8.11