diff --git a/src/storm/models/sparse/Mdp.cpp b/src/storm/models/sparse/Mdp.cpp index f0c17576d..081940600 100644 --- a/src/storm/models/sparse/Mdp.cpp +++ b/src/storm/models/sparse/Mdp.cpp @@ -38,10 +38,6 @@ namespace storm { } - template - uint_least64_t Mdp::getChoiceIndex(storm::storage::StateActionPair const& stateactPair) const { - return this->getNondeterministicChoiceIndices()[stateactPair.getState()]+stateactPair.getAction(); - } template class Mdp; diff --git a/src/storm/models/sparse/Mdp.h b/src/storm/models/sparse/Mdp.h index 9ee06fc22..9e5ea7509 100644 --- a/src/storm/models/sparse/Mdp.h +++ b/src/storm/models/sparse/Mdp.h @@ -1,9 +1,7 @@ #ifndef STORM_MODELS_SPARSE_MDP_H_ #define STORM_MODELS_SPARSE_MDP_H_ -#include "storm/storage/StateActionPair.h" #include "storm/models/sparse/NondeterministicModel.h" -#include "storm/utility/OsDetection.h" namespace storm { namespace models { @@ -50,12 +48,6 @@ namespace storm { Mdp(Mdp&& other) = default; Mdp& operator=(Mdp&& other) = default; - - - /*! - * For a state/action pair, get the choice index referring to the state-action pair. - */ - uint_fast64_t getChoiceIndex(storm::storage::StateActionPair const& stateactPair) const; }; } // namespace sparse diff --git a/src/storm/models/sparse/NondeterministicModel.cpp b/src/storm/models/sparse/NondeterministicModel.cpp index 3382bfd95..acdbd3885 100644 --- a/src/storm/models/sparse/NondeterministicModel.cpp +++ b/src/storm/models/sparse/NondeterministicModel.cpp @@ -185,7 +185,12 @@ namespace storm { outStream << "}" << std::endl; } } - + + template + uint_least64_t NondeterministicModel::getChoiceIndex(storm::storage::StateActionPair const& stateactPair) const { + return this->getNondeterministicChoiceIndices()[stateactPair.getState()]+stateactPair.getAction(); + } + template class NondeterministicModel; #ifdef STORM_HAVE_CARL diff --git a/src/storm/models/sparse/NondeterministicModel.h b/src/storm/models/sparse/NondeterministicModel.h index ab0a21a04..dd1335718 100644 --- a/src/storm/models/sparse/NondeterministicModel.h +++ b/src/storm/models/sparse/NondeterministicModel.h @@ -2,7 +2,7 @@ #define STORM_MODELS_SPARSE_NONDETERMINISTICMODEL_H_ #include "storm/models/sparse/Model.h" -#include "storm/utility/OsDetection.h" +#include "storm/storage/StateActionPair.h" namespace storm { @@ -54,7 +54,11 @@ namespace storm { uint_fast64_t getNumberOfChoices(uint_fast64_t state) const; virtual void reduceToStateBasedRewards() override; - + + /*! + * For a state/action pair, get the choice index referring to the state-action pair. + */ + uint_fast64_t getChoiceIndex(storm::storage::StateActionPair const& stateactPair) const; /*! * Applies the given scheduler to this model. * @param scheduler the considered scheduler.