Bayes Filters Library
|
#include <ParticleFilter.h>
Public Member Functions | |
virtual | ~ParticleFilter () noexcept=default |
bool | skip (const std::string &what_step, const bool status) override |
bool | boot () override |
void | run () override |
bool | wait () override |
void | reset () override |
void | reboot () override |
bool | teardown () override |
unsigned int | step_number () override |
bool | is_running () override |
bool | enable_log (const std::string &folder_path, const std::string &file_name_prefix) |
bool | disable_log () |
std::string | get_folder_path () const |
std::string | get_file_name_prefix () const |
template<typename DatumType > | |
void | logger (DatumType datum) |
template<typename... DataType> | |
void | logger (DataType... data) |
template<typename DatumType > | |
void | logger (DatumType datum) const |
template<typename... DataType> | |
void | logger (DataType... data) const |
Protected Member Functions | |
ParticleFilter (std::unique_ptr< ParticleSetInitialization > initialization, std::unique_ptr< PFPrediction > prediction, std::unique_ptr< PFCorrection > correction, std::unique_ptr< Resampling > resampling) noexcept | |
ParticleFilter (const ParticleFilter &filter) noexcept=delete | |
ParticleFilter & | operator= (const ParticleFilter &filter) noexcept=delete |
ParticleFilter (ParticleFilter &&filter) noexcept=delete | |
ParticleFilter & | operator= (ParticleFilter &&filter) noexcept=delete |
ParticleSetInitialization & | initialization () |
PFPrediction & | prediction () |
PFCorrection & | correction () |
Resampling & | resampling () |
virtual bool | initialization_step ()=0 |
virtual void | filtering_step ()=0 |
virtual bool | run_condition ()=0 |
virtual std::vector< std::string > | log_file_names (const std::string &folder_path, const std::string &file_name_prefix) |
virtual void | log () |
Private Member Functions | |
void | filtering_recursion () |
template<typename DatumType > | |
void | logger_helper (const size_t pos, DatumType datum) |
template<typename DatumType , typename... DataType> | |
void | logger_helper (const size_t pos, DatumType datum, DataType... data) |
template<typename DatumType > | |
void | logger_helper (const size_t pos, DatumType datum) const |
template<typename DatumType , typename... DataType> | |
void | logger_helper (const size_t pos, DatumType datum, DataType... data) const |
Private Attributes | |
std::unique_ptr< ParticleSetInitialization > | initialization_ |
std::unique_ptr< PFPrediction > | prediction_ |
std::unique_ptr< PFCorrection > | correction_ |
std::unique_ptr< Resampling > | resampling_ |
unsigned int | filtering_step_ = 0 |
std::thread | filtering_thread_ |
std::mutex | mtx_run_ |
std::condition_variable | cv_run_ |
bool | run_ = false |
bool | reset_ = false |
bool | teardown_ = false |
std::string | folder_path_ |
std::string | file_name_prefix_ |
std::vector< std::string > | file_names_ |
bool | log_enabled_ = false |
std::vector< std::ofstream > | log_files_ |
Definition at line 24 of file ParticleFilter.h.
|
virtualdefaultnoexcept |
|
protectednoexcept |
Definition at line 14 of file ParticleFilter.cpp.
|
protecteddeletenoexcept |
|
protecteddeletenoexcept |
|
overridevirtualinherited |
Implements bfl::Filter.
Definition at line 15 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::filtering_recursion(), and bfl::FilteringAlgorithm::filtering_thread_.
|
protected |
Definition at line 65 of file ParticleFilter.cpp.
References correction_.
|
inherited |
Definition at line 68 of file Logger.cpp.
References bfl::Logger::file_names_, bfl::Logger::log_enabled_, and bfl::Logger::log_files_.
Referenced by bfl::Logger::~Logger().
|
inherited |
Definition at line 22 of file Logger.cpp.
References bfl::Logger::file_name_prefix_, bfl::Logger::file_names_, bfl::Logger::folder_path_, bfl::Logger::log_enabled_, bfl::Logger::log_file_names(), and bfl::Logger::log_files_.
|
privateinherited |
Definition at line 102 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::cv_run_, bfl::FilteringAlgorithm::filtering_step(), bfl::FilteringAlgorithm::filtering_step_, bfl::FilteringAlgorithm::initialization_step(), bfl::FilteringAlgorithm::mtx_run_, bfl::FilteringAlgorithm::reset_, bfl::FilteringAlgorithm::run_, bfl::FilteringAlgorithm::run_condition(), and bfl::FilteringAlgorithm::teardown_.
Referenced by bfl::FilteringAlgorithm::boot().
|
protectedpure virtualinherited |
Implemented in bfl::SIS.
Referenced by bfl::FilteringAlgorithm::filtering_recursion().
|
inherited |
Definition at line 91 of file Logger.cpp.
References bfl::Logger::file_name_prefix_.
|
inherited |
Definition at line 85 of file Logger.cpp.
References bfl::Logger::folder_path_.
|
protected |
Definition at line 53 of file ParticleFilter.cpp.
References initialization_.
|
protectedpure virtualinherited |
Implemented in bfl::SIS.
Referenced by bfl::FilteringAlgorithm::filtering_recursion().
|
overridevirtualinherited |
Implements bfl::Filter.
Definition at line 96 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::run_.
|
protectedvirtualinherited |
Reimplemented in bfl::SimulatedStateModel, bfl::SIS, and bfl::SimulatedLinearSensor.
Definition at line 109 of file Logger.cpp.
|
protectedvirtualinherited |
Reimplemented in bfl::LinearModel, bfl::SimulatedStateModel, and bfl::SIS.
Definition at line 97 of file Logger.cpp.
Referenced by bfl::Logger::enable_log().
|
inlineinherited |
Definition at line 42 of file Logger.h.
References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().
|
inlineinherited |
Definition at line 56 of file Logger.h.
References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().
|
inlineinherited |
Definition at line 35 of file Logger.h.
References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.
Referenced by bfl::SimulatedLinearSensor::log().
|
inlineinherited |
Definition at line 49 of file Logger.h.
References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.
|
inlineprivateinherited |
Definition at line 81 of file Logger.h.
References bfl::Logger::log_files_.
Referenced by bfl::Logger::logger(), and bfl::Logger::logger_helper().
|
inlineprivateinherited |
Definition at line 95 of file Logger.h.
References bfl::Logger::log_files_.
|
inlineprivateinherited |
Definition at line 87 of file Logger.h.
References bfl::Logger::log_files_, and bfl::Logger::logger_helper().
|
inlineprivateinherited |
Definition at line 101 of file Logger.h.
References bfl::Logger::log_files_, and bfl::Logger::logger_helper().
|
protecteddeletenoexcept |
|
protecteddeletenoexcept |
|
protected |
Definition at line 59 of file ParticleFilter.cpp.
References prediction_.
|
overridevirtualinherited |
Implements bfl::Filter.
Definition at line 73 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::cv_run_, bfl::FilteringAlgorithm::mtx_run_, bfl::FilteringAlgorithm::reset_, and bfl::FilteringAlgorithm::run_.
|
protected |
Definition at line 71 of file ParticleFilter.cpp.
References resampling_.
|
overridevirtualinherited |
Implements bfl::Filter.
Definition at line 67 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::reset_.
|
overridevirtualinherited |
Implements bfl::Filter.
Definition at line 33 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::cv_run_, bfl::FilteringAlgorithm::mtx_run_, and bfl::FilteringAlgorithm::run_.
|
protectedpure virtualinherited |
Implemented in bfl::SIS.
Referenced by bfl::FilteringAlgorithm::filtering_recursion().
|
overridevirtual |
Implements bfl::Skipper.
Definition at line 28 of file ParticleFilter.cpp.
References correction_, and prediction_.
|
overridevirtualinherited |
Implements bfl::Filter.
Definition at line 90 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::filtering_step_.
|
overridevirtualinherited |
Implements bfl::Filter.
Definition at line 82 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::teardown_.
|
overridevirtualinherited |
Implements bfl::Filter.
Definition at line 41 of file FilteringAlgorithm.cpp.
References bfl::FilteringAlgorithm::filtering_thread_.
|
private |
Definition at line 58 of file ParticleFilter.h.
Referenced by correction(), and skip().
|
privateinherited |
Definition at line 75 of file FilteringAlgorithm.h.
Referenced by bfl::FilteringAlgorithm::filtering_recursion(), bfl::FilteringAlgorithm::reboot(), and bfl::FilteringAlgorithm::run().
|
privateinherited |
Definition at line 72 of file Logger.h.
Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_file_name_prefix().
|
privateinherited |
Definition at line 74 of file Logger.h.
Referenced by bfl::Logger::disable_log(), and bfl::Logger::enable_log().
|
privateinherited |
Definition at line 69 of file FilteringAlgorithm.h.
Referenced by bfl::FilteringAlgorithm::filtering_recursion(), and bfl::FilteringAlgorithm::step_number().
|
privateinherited |
Definition at line 71 of file FilteringAlgorithm.h.
Referenced by bfl::FilteringAlgorithm::boot(), and bfl::FilteringAlgorithm::wait().
|
privateinherited |
Definition at line 70 of file Logger.h.
Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_folder_path().
|
private |
Definition at line 54 of file ParticleFilter.h.
Referenced by initialization().
|
privateinherited |
Definition at line 76 of file Logger.h.
Referenced by bfl::Logger::disable_log(), bfl::Logger::enable_log(), bfl::Logger::logger(), and bfl::Logger::~Logger().
|
mutableprivateinherited |
Definition at line 78 of file Logger.h.
Referenced by bfl::Logger::disable_log(), bfl::Logger::enable_log(), bfl::Logger::logger(), and bfl::Logger::logger_helper().
|
privateinherited |
Definition at line 73 of file FilteringAlgorithm.h.
Referenced by bfl::FilteringAlgorithm::filtering_recursion(), bfl::FilteringAlgorithm::reboot(), and bfl::FilteringAlgorithm::run().
|
private |
Definition at line 56 of file ParticleFilter.h.
Referenced by prediction(), and skip().
|
private |
Definition at line 60 of file ParticleFilter.h.
Referenced by resampling().
|
privateinherited |
Definition at line 79 of file FilteringAlgorithm.h.
Referenced by bfl::FilteringAlgorithm::filtering_recursion(), bfl::FilteringAlgorithm::reboot(), and bfl::FilteringAlgorithm::reset().
|
privateinherited |
Definition at line 77 of file FilteringAlgorithm.h.
Referenced by bfl::FilteringAlgorithm::filtering_recursion(), bfl::FilteringAlgorithm::is_running(), bfl::FilteringAlgorithm::reboot(), and bfl::FilteringAlgorithm::run().
|
privateinherited |
Definition at line 81 of file FilteringAlgorithm.h.
Referenced by bfl::FilteringAlgorithm::filtering_recursion(), and bfl::FilteringAlgorithm::teardown().