From d939ebe375a658a726b2c65cafc6f40598e9d817 Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Wed, 16 Dec 2020 11:19:45 +0100 Subject: [PATCH] smg model now stores the player action indices --- src/storm/models/sparse/Smg.cpp | 12 ++++++++---- src/storm/models/sparse/Smg.h | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/storm/models/sparse/Smg.cpp b/src/storm/models/sparse/Smg.cpp index e0419844c..e7c20c9fa 100644 --- a/src/storm/models/sparse/Smg.cpp +++ b/src/storm/models/sparse/Smg.cpp @@ -6,6 +6,7 @@ #include "storm/adapters/RationalFunctionAdapter.h" #include "storm/models/sparse/StandardRewardModel.h" +#include "storm/models/sparse/Mdp.h" namespace storm { namespace models { @@ -29,14 +30,17 @@ namespace storm { Smg::Smg(storm::storage::sparse::ModelComponents const& components, ModelType type) : NondeterministicModel(type, components) { assert(type == storm::models::ModelType::Smg); - // Intentionally left empty } - template + template Smg::Smg(storm::storage::sparse::ModelComponents&& components, ModelType type) - : NondeterministicModel(type, std::move(components)) { + : NondeterministicModel(type, std::move(components)), playerActionIndices(components.playerActionIndices.get()) { assert(type == storm::models::ModelType::Smg); - // Intentionally left empty + } + + template + std::vector Smg::getPlayerActionIndices() const { + return playerActionIndices; } template class Smg; diff --git a/src/storm/models/sparse/Smg.h b/src/storm/models/sparse/Smg.h index 663817418..2bf7146c8 100644 --- a/src/storm/models/sparse/Smg.h +++ b/src/storm/models/sparse/Smg.h @@ -48,6 +48,11 @@ namespace storm { Smg(Smg&& other) = default; Smg& operator=(Smg&& other) = default; + + std::vector getPlayerActionIndices() const; + + private: + std::vector playerActionIndices; }; } // namespace sparse