Bayes Filters Library
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
bfl::SIS Class Reference

#include <SIS.h>

Inheritance diagram for bfl::SIS:
[legend]

Public Member Functions

 SIS (unsigned int num_particle, std::size_t state_size_linear, std::size_t state_size_circular, std::unique_ptr< ParticleSetInitialization > initialization, std::unique_ptr< PFPrediction > prediction, std::unique_ptr< PFCorrection > correction, std::unique_ptr< Resampling > resampling) noexcept
 
 SIS (unsigned int num_particle, std::size_t state_size_linear, std::unique_ptr< ParticleSetInitialization > initialization, std::unique_ptr< PFPrediction > prediction, std::unique_ptr< PFCorrection > correction, std::unique_ptr< Resampling > resampling) noexcept
 
 SIS (const SIS &filter) noexcept=delete
 
SISoperator= (const SIS &filter) noexcept=delete
 
 SIS (SIS &&filter) noexcept=delete
 
SISoperator= (SIS &&filter) noexcept=delete
 
virtual ~SIS () 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

bool initialization_step () override
 
void filtering_step () override
 
bool run_condition () override
 
std::vector< std::string > log_file_names (const std::string &folder_path, const std::string &file_name_prefix) override
 
void log () override
 
ParticleSetInitializationinitialization ()
 
PFPredictionprediction ()
 
PFCorrectioncorrection ()
 
Resamplingresampling ()
 

Protected Attributes

unsigned int num_particle_
 
std::size_t state_size_
 
ParticleSet pred_particle_
 
ParticleSet cor_particle_
 

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< ParticleSetInitializationinitialization_
 
std::unique_ptr< PFPredictionprediction_
 
std::unique_ptr< PFCorrectioncorrection_
 
std::unique_ptr< Resamplingresampling_
 
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_
 

Detailed Description

Definition at line 25 of file SIS.h.

Constructor & Destructor Documentation

◆ SIS() [1/4]

SIS::SIS ( unsigned int  num_particle,
std::size_t  state_size_linear,
std::size_t  state_size_circular,
std::unique_ptr< ParticleSetInitialization initialization,
std::unique_ptr< PFPrediction prediction,
std::unique_ptr< PFCorrection correction,
std::unique_ptr< Resampling resampling 
)
noexcept

Definition at line 22 of file SIS.cpp.

◆ SIS() [2/4]

SIS::SIS ( unsigned int  num_particle,
std::size_t  state_size_linear,
std::unique_ptr< ParticleSetInitialization initialization,
std::unique_ptr< PFPrediction prediction,
std::unique_ptr< PFCorrection correction,
std::unique_ptr< Resampling resampling 
)
noexcept

Definition at line 40 of file SIS.cpp.

◆ SIS() [3/4]

bfl::SIS::SIS ( const SIS filter)
deletenoexcept

◆ SIS() [4/4]

bfl::SIS::SIS ( SIS &&  filter)
deletenoexcept

◆ ~SIS()

virtual bfl::SIS::~SIS ( )
virtualdefaultnoexcept

Member Function Documentation

◆ boot()

bool FilteringAlgorithm::boot ( )
overridevirtualinherited

Implements bfl::Filter.

Definition at line 15 of file FilteringAlgorithm.cpp.

References bfl::FilteringAlgorithm::filtering_recursion(), and bfl::FilteringAlgorithm::filtering_thread_.

Here is the call graph for this function:

◆ correction()

PFCorrection & ParticleFilter::correction ( )
protectedinherited

Definition at line 65 of file ParticleFilter.cpp.

References bfl::ParticleFilter::correction_.

◆ disable_log()

bool Logger::disable_log ( )
inherited

◆ enable_log()

bool Logger::enable_log ( const std::string &  folder_path,
const std::string &  file_name_prefix 
)
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_.

Here is the call graph for this function:

◆ filtering_recursion()

void FilteringAlgorithm::filtering_recursion ( )
privateinherited

◆ filtering_step()

void SIS::filtering_step ( )
overrideprotectedvirtual

Implements bfl::FilteringAlgorithm.

Definition at line 58 of file SIS.cpp.

References bfl::utils::log_sum_exp().

Here is the call graph for this function:

◆ get_file_name_prefix()

std::string Logger::get_file_name_prefix ( ) const
inherited

Definition at line 91 of file Logger.cpp.

References bfl::Logger::file_name_prefix_.

◆ get_folder_path()

std::string Logger::get_folder_path ( ) const
inherited

Definition at line 85 of file Logger.cpp.

References bfl::Logger::folder_path_.

◆ initialization()

ParticleSetInitialization & ParticleFilter::initialization ( )
protectedinherited

Definition at line 53 of file ParticleFilter.cpp.

References bfl::ParticleFilter::initialization_.

◆ initialization_step()

bool SIS::initialization_step ( )
overrideprotectedvirtual

Implements bfl::FilteringAlgorithm.

Definition at line 52 of file SIS.cpp.

◆ is_running()

bool FilteringAlgorithm::is_running ( )
overridevirtualinherited

Implements bfl::Filter.

Definition at line 96 of file FilteringAlgorithm.cpp.

References bfl::FilteringAlgorithm::run_.

◆ log()

void SIS::log ( )
overrideprotectedvirtual

Reimplemented from bfl::Logger.

Definition at line 102 of file SIS.cpp.

◆ log_file_names()

std::vector< std::string > SIS::log_file_names ( const std::string &  folder_path,
const std::string &  file_name_prefix 
)
overrideprotectedvirtual

Reimplemented from bfl::Logger.

Definition at line 93 of file SIS.cpp.

◆ logger() [1/4]

template<typename... DataType>
void bfl::Logger::logger ( DataType...  data)
inlineinherited

Definition at line 42 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger() [2/4]

template<typename... DataType>
void bfl::Logger::logger ( DataType...  data) const
inlineinherited

Definition at line 56 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger() [3/4]

template<typename DatumType >
void bfl::Logger::logger ( DatumType  datum)
inlineinherited

Definition at line 35 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.

Referenced by bfl::SimulatedLinearSensor::log().

◆ logger() [4/4]

template<typename DatumType >
void bfl::Logger::logger ( DatumType  datum) const
inlineinherited

Definition at line 49 of file Logger.h.

References bfl::Logger::log_enabled_, and bfl::Logger::log_files_.

◆ logger_helper() [1/4]

template<typename DatumType >
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum 
)
inlineprivateinherited

Definition at line 81 of file Logger.h.

References bfl::Logger::log_files_.

Referenced by bfl::Logger::logger(), and bfl::Logger::logger_helper().

◆ logger_helper() [2/4]

template<typename DatumType >
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum 
) const
inlineprivateinherited

Definition at line 95 of file Logger.h.

References bfl::Logger::log_files_.

◆ logger_helper() [3/4]

template<typename DatumType , typename... DataType>
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum,
DataType...  data 
)
inlineprivateinherited

Definition at line 87 of file Logger.h.

References bfl::Logger::log_files_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ logger_helper() [4/4]

template<typename DatumType , typename... DataType>
void bfl::Logger::logger_helper ( const size_t  pos,
DatumType  datum,
DataType...  data 
) const
inlineprivateinherited

Definition at line 101 of file Logger.h.

References bfl::Logger::log_files_, and bfl::Logger::logger_helper().

Here is the call graph for this function:

◆ operator=() [1/2]

SIS& bfl::SIS::operator= ( const SIS filter)
deletenoexcept

◆ operator=() [2/2]

SIS& bfl::SIS::operator= ( SIS &&  filter)
deletenoexcept

◆ prediction()

PFPrediction & ParticleFilter::prediction ( )
protectedinherited

Definition at line 59 of file ParticleFilter.cpp.

References bfl::ParticleFilter::prediction_.

◆ reboot()

void FilteringAlgorithm::reboot ( )
overridevirtualinherited

◆ resampling()

Resampling & ParticleFilter::resampling ( )
protectedinherited

Definition at line 71 of file ParticleFilter.cpp.

References bfl::ParticleFilter::resampling_.

◆ reset()

void FilteringAlgorithm::reset ( )
overridevirtualinherited

Implements bfl::Filter.

Definition at line 67 of file FilteringAlgorithm.cpp.

References bfl::FilteringAlgorithm::reset_.

◆ run()

void FilteringAlgorithm::run ( )
overridevirtualinherited

◆ run_condition()

bool SIS::run_condition ( )
overrideprotectedvirtual

Implements bfl::FilteringAlgorithm.

Definition at line 87 of file SIS.cpp.

◆ skip()

bool ParticleFilter::skip ( const std::string &  what_step,
const bool  status 
)
overridevirtualinherited

◆ step_number()

unsigned int FilteringAlgorithm::step_number ( )
overridevirtualinherited

Implements bfl::Filter.

Definition at line 90 of file FilteringAlgorithm.cpp.

References bfl::FilteringAlgorithm::filtering_step_.

◆ teardown()

bool FilteringAlgorithm::teardown ( )
overridevirtualinherited

Implements bfl::Filter.

Definition at line 82 of file FilteringAlgorithm.cpp.

References bfl::FilteringAlgorithm::teardown_.

◆ wait()

bool FilteringAlgorithm::wait ( )
overridevirtualinherited

Implements bfl::Filter.

Definition at line 41 of file FilteringAlgorithm.cpp.

References bfl::FilteringAlgorithm::filtering_thread_.

Member Data Documentation

◆ cor_particle_

ParticleSet bfl::SIS::cor_particle_
protected

Definition at line 60 of file SIS.h.

◆ correction_

std::unique_ptr<PFCorrection> bfl::ParticleFilter::correction_
privateinherited

Definition at line 58 of file ParticleFilter.h.

Referenced by bfl::ParticleFilter::correction(), and bfl::ParticleFilter::skip().

◆ cv_run_

std::condition_variable bfl::FilteringAlgorithm::cv_run_
privateinherited

◆ file_name_prefix_

std::string bfl::Logger::file_name_prefix_
privateinherited

Definition at line 72 of file Logger.h.

Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_file_name_prefix().

◆ file_names_

std::vector<std::string> bfl::Logger::file_names_
privateinherited

Definition at line 74 of file Logger.h.

Referenced by bfl::Logger::disable_log(), and bfl::Logger::enable_log().

◆ filtering_step_

unsigned int bfl::FilteringAlgorithm::filtering_step_ = 0
privateinherited

◆ filtering_thread_

std::thread bfl::FilteringAlgorithm::filtering_thread_
privateinherited

◆ folder_path_

std::string bfl::Logger::folder_path_
privateinherited

Definition at line 70 of file Logger.h.

Referenced by bfl::Logger::enable_log(), and bfl::Logger::get_folder_path().

◆ initialization_

std::unique_ptr<ParticleSetInitialization> bfl::ParticleFilter::initialization_
privateinherited

Definition at line 54 of file ParticleFilter.h.

Referenced by bfl::ParticleFilter::initialization().

◆ log_enabled_

bool bfl::Logger::log_enabled_ = false
privateinherited

◆ log_files_

std::vector<std::ofstream> bfl::Logger::log_files_
mutableprivateinherited

◆ mtx_run_

std::mutex bfl::FilteringAlgorithm::mtx_run_
privateinherited

◆ num_particle_

unsigned int bfl::SIS::num_particle_
protected

Definition at line 54 of file SIS.h.

◆ pred_particle_

ParticleSet bfl::SIS::pred_particle_
protected

Definition at line 58 of file SIS.h.

◆ prediction_

std::unique_ptr<PFPrediction> bfl::ParticleFilter::prediction_
privateinherited

Definition at line 56 of file ParticleFilter.h.

Referenced by bfl::ParticleFilter::prediction(), and bfl::ParticleFilter::skip().

◆ resampling_

std::unique_ptr<Resampling> bfl::ParticleFilter::resampling_
privateinherited

Definition at line 60 of file ParticleFilter.h.

Referenced by bfl::ParticleFilter::resampling().

◆ reset_

bool bfl::FilteringAlgorithm::reset_ = false
privateinherited

◆ run_

bool bfl::FilteringAlgorithm::run_ = false
privateinherited

◆ state_size_

std::size_t bfl::SIS::state_size_
protected

Definition at line 56 of file SIS.h.

◆ teardown_

bool bfl::FilteringAlgorithm::teardown_ = false
privateinherited

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