Bayes Filters Library
src
BayesFilters
src
GaussianPrediction.cpp
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
#include <
BayesFilters/GaussianPrediction.h
>
9
10
#include <exception>
11
#include <iostream>
12
13
using namespace
bfl
;
14
using namespace
Eigen;
15
16
17
18
void
GaussianPrediction::predict
(
const
GaussianMixture
& prev_state,
GaussianMixture
& pred_state)
19
{
20
if
(!skip_)
21
predictStep(prev_state, pred_state);
22
else
23
pred_state = prev_state;
24
}
25
26
27
bool
GaussianPrediction::skip
(
const
std::string& what_step,
const
bool
status)
28
{
29
if
(what_step ==
"prediction"
)
30
{
31
skip_ = status;
32
33
getStateModel().skip(
"state"
, status);
34
35
getStateModel().skip(
"exogenous"
, status);
36
}
37
else
if
(what_step ==
"state"
)
38
{
39
getStateModel().skip(
"state"
, status);
40
41
skip_ = getStateModel().is_skipping() & getStateModel().exogenous_model().is_skipping();
42
}
43
else
if
(what_step ==
"exogenous"
)
44
{
45
getStateModel().skip(
"exogenous"
, status);
46
47
skip_ = getStateModel().is_skipping() & getStateModel().exogenous_model().is_skipping();
48
}
49
else
50
return
false
;
51
52
return
true
;
53
}
54
55
56
bool
GaussianPrediction::is_skipping
()
57
{
58
return
skip_;
59
}
bfl::GaussianPrediction::skip
bool skip(const std::string &what_step, const bool status) override
Definition:
GaussianPrediction.cpp:27
GaussianPrediction.h
bfl
Port of boost::any for C++11 compilers.
Definition:
AdditiveMeasurementModel.h:13
bfl::GaussianPrediction::is_skipping
bool is_skipping() override
Definition:
GaussianPrediction.cpp:56
bfl::GaussianPrediction::predict
void predict(const GaussianMixture &prev_state, GaussianMixture &pred_state) override
Definition:
GaussianPrediction.cpp:18
bfl::GaussianMixture
Definition:
GaussianMixture.h:20
Generated by
1.8.17