Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BeliefBuilder.h
Go to the documentation of this file.
1#pragma once
2#include <cstdint>
3
5
6namespace storm::pomdp::beliefs {
7
12template<typename BeliefType>
14 public:
15 using ValueType = typename BeliefType::ValueType;
16
22 void reserve(uint64_t size);
23
28 void addValue(BeliefStateType const& state, ValueType const& value);
29
34 void setObservation(BeliefObservationType const& observation);
35
43
50 BeliefType build();
51
56 void reset();
57
58 private:
59 bool assertBelief();
60
63};
64
65} // namespace storm::pomdp::beliefs
void reserve(uint64_t size)
Reserves space to build the belief more efficiently.
BeliefType build()
Builds the belief and returns it.
ValueType normalize()
Normalizes the belief, i.e., if the sum of the values is not 1, it divides all values by the sum.
void setObservation(BeliefObservationType const &observation)
Sets the observation of the belief.
typename BeliefType::ValueType ValueType
void addValue(BeliefStateType const &state, ValueType const &value)
Adds a probability value to the given state.
void reset()
Resets the builder to its initial state.
constexpr BeliefObservationType InvalidObservation
Required e.g. for comparing two beliefs.
Definition types.h:20
uint64_t BeliefStateType
Shared identifiers and sparse-container types used by the belief subsystem.
Definition types.h:10
uint32_t BeliefObservationType
Definition types.h:11
boost::container::flat_map< BeliefStateType, BeliefValueType > BeliefFlatMap
Definition types.h:17