Browse Source

hashing POMDPs

tempestpy_adaptions
Sebastian Junges 5 years ago
parent
commit
e2b0855208
  1. 9
      src/storm/models/sparse/Pomdp.cpp
  2. 2
      src/storm/models/sparse/Pomdp.h

9
src/storm/models/sparse/Pomdp.cpp

@ -104,6 +104,15 @@ namespace storm {
this->canonicFlag = newValue;
}
template<typename ValueType, typename RewardModelType>
std::size_t Pomdp<ValueType, RewardModelType>::hash() const {
std::size_t seed = 0;
boost::hash_combine(seed,sparse::Model<ValueType,RewardModelType>::hash());
boost::hash_combine(seed,boost::hash_range(observations.begin(), observations.end()));
return seed;
}
template class Pomdp<double>;
template class Pomdp<storm::RationalNumber>;

2
src/storm/models/sparse/Pomdp.h

@ -72,6 +72,8 @@ namespace storm {
void setIsCanonic(bool newValue = true);
virtual std::size_t hash() const override;
protected:
/*!
* Return a string that is additonally added to the state information in the dot stream.

Loading…
Cancel
Save