Bayes Filters Library
StateModel.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2019 Istituto Italiano di Tecnologia (IIT)
3  *
4  * This software may be modified and distributed under the terms of the
5  * BSD 3-Clause license. See the accompanying LICENSE file for details.
6  */
7 
8 #ifndef STATEMODEL_H
9 #define STATEMODEL_H
10 
12 #include <BayesFilters/Skippable.h>
14 
15 #include <memory>
16 
17 namespace bfl {
18  class StateModel;
19 }
20 
21 
22 class bfl::StateModel : public StateProcess, public Skippable
23 {
24 public:
25  virtual ~StateModel() noexcept = default;
26 
27  bool skip(const std::string& what_step, const bool status) override;
28 
29  bool is_skipping() override;
30 
31  bool add_exogenous_model(std::unique_ptr<ExogenousModel> exogenous_model);
32 
33  bool have_exogenous_model() noexcept;
34 
36 
37  virtual Eigen::MatrixXd getJacobian();
38 
39  virtual Eigen::VectorXd getTransitionProbability(const Eigen::Ref<const Eigen::MatrixXd>& prev_states, const Eigen::Ref<const Eigen::MatrixXd>& cur_states);
40 
41  virtual Eigen::MatrixXd getNoiseCovarianceMatrix();
42 
43  virtual Eigen::MatrixXd getNoiseSample(const std::size_t num);
44 
45  virtual bool setSamplingTime(const double& time);
46 
47 protected:
48  StateModel() noexcept = default;
49 
50  StateModel(const StateModel& state_model) noexcept = delete;
51 
52  StateModel& operator=(const StateModel& state_model) noexcept = delete;
53 
54  StateModel(StateModel&& state_model) noexcept = default;
55 
56  StateModel& operator=(StateModel&& state_model) noexcept = default;
57 
58 
59 private:
63  bool skip_ = false;
64 
68  std::unique_ptr<ExogenousModel> exogenous_model_;
69 };
70 
71 #endif /* STATEMODEL_H */
StateProcess.h
bfl::StateModel::exogenous_model_
std::unique_ptr< ExogenousModel > exogenous_model_
Exogenous model.
Definition: StateModel.h:68
bfl::StateModel::exogenous_model
ExogenousModel & exogenous_model()
Definition: StateModel.cpp:50
bfl::StateModel::skip_
bool skip_
Skip status.
Definition: StateModel.h:63
bfl
Port of boost::any for C++11 compilers.
Definition: AdditiveMeasurementModel.h:13
bfl::StateModel::setSamplingTime
virtual bool setSamplingTime(const double &time)
Definition: StateModel.cpp:84
bfl::StateModel::getNoiseSample
virtual Eigen::MatrixXd getNoiseSample(const std::size_t num)
Definition: StateModel.cpp:78
bfl::StateModel::have_exogenous_model
bool have_exogenous_model() noexcept
Definition: StateModel.cpp:41
bfl::StateModel::add_exogenous_model
bool add_exogenous_model(std::unique_ptr< ExogenousModel > exogenous_model)
Definition: StateModel.cpp:33
Skippable.h
bfl::StateModel::getTransitionProbability
virtual Eigen::VectorXd getTransitionProbability(const Eigen::Ref< const Eigen::MatrixXd > &prev_states, const Eigen::Ref< const Eigen::MatrixXd > &cur_states)
Definition: StateModel.cpp:66
bfl::ExogenousModel
Definition: ExogenousModel.h:19
bfl::StateModel::getJacobian
virtual Eigen::MatrixXd getJacobian()
Definition: StateModel.cpp:60
bfl::StateModel
Definition: StateModel.h:22
bfl::StateModel::getNoiseCovarianceMatrix
virtual Eigen::MatrixXd getNoiseCovarianceMatrix()
Definition: StateModel.cpp:72
ExogenousModel.h
bfl::StateModel::skip
bool skip(const std::string &what_step, const bool status) override
Definition: StateModel.cpp:14
bfl::StateModel::is_skipping
bool is_skipping() override
Definition: StateModel.cpp:27
bfl::StateModel::~StateModel
virtual ~StateModel() noexcept=default
bfl::StateModel::operator=
StateModel & operator=(const StateModel &state_model) noexcept=delete
bfl::StateProcess
Definition: StateProcess.h:20
bfl::StateModel::StateModel
StateModel() noexcept=default
bfl::Skippable
Definition: Skippable.h:18