23 template <
typename MeasVar>
34 template <
typename MeasVar>
40 template <
typename MeasVar>
48 for (
int to_state = 0; to_state< num_states ; to_state++)
53 for (
int from_state = 0; from_state< num_states ; from_state++)
60 for (
int from_state = 0; from_state< num_states ; from_state++)
70 template <
typename MeasVar>
76 for (
int state = 0; state< num_states ; state++)
85 template <
typename MeasVar>
92 if (sysmodel != NULL)
SysUpdate(sysmodel,u);
93 if (measmodel != NULL)
MeasUpdate(measmodel,z,s);
97 template <
typename MeasVar>
Abstract class representing an interface for Bayesian Filters.
bool UpdateInternal(SystemModel< int > *const sysmodel, const int &u, MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
Actual implementation of Update, varies along filters.
Class representing a PDF on a discrete variable.
Class representing the histogram filter.
bool SystemWithoutSensorParams() const
Number of Conditional Arguments.
Pdf< int > * _post
Pointer to the Posterior Pdf.
virtual ~HistogramFilter()
Destructor.
bool SystemWithoutInputs() const
Has the system inputs or not.
virtual Pdf< StateVar > * PostGet()
Get Posterior density.
Probability ProbabilityGet(const MeasVar &z, const StateVar &x, const StateVar &s)
Get the probability of a certain measurement.
vector< Probability > ProbabilitiesGet() const
Get all probabilities.
void MeasUpdate(MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
Measurement Update.
virtual DiscretePdf * PostGet()
Get Posterior density.
void SysUpdate(SystemModel< int > *const sysmodel, const int &u)
vector< Probability > _old_prob
While updating store list of old probabilities.
vector< Probability > _new_prob
While updating store list of new probabilities.
Probability ProbabilityGet(const T &x_k, const T &x_kminusone, const T &u)
Get the probability of arriving in a next state.
Class representing a probability (a double between 0 and 1)