From e998cb669bf4e3850c504333a723d91f83800a68 Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Fri, 29 Jan 2021 08:11:25 +0100 Subject: [PATCH] smg model now stores the player action indices --- src/storm/models/sparse/Smg.cpp | 5 ++--- src/storm/models/sparse/Smg.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/storm/models/sparse/Smg.cpp b/src/storm/models/sparse/Smg.cpp index 40481ee06..af9846f19 100644 --- a/src/storm/models/sparse/Smg.cpp +++ b/src/storm/models/sparse/Smg.cpp @@ -37,7 +37,6 @@ namespace storm { storm::storage::PlayerIndex Smg::getPlayerOfState(uint64_t stateIndex) const { STORM_LOG_ASSERT(stateIndex < this->getNumberOfStates(), "Invalid state index: " << stateIndex << "."); return statePlayerIndications[stateIndex]; - } template storm::storage::PlayerIndex Smg::getPlayerIndex(std::string const& playerName) const { @@ -62,7 +61,7 @@ namespace storm { for (auto const& pi : coalitionAsIndexSet) { coalitionAsBitVector.set(pi); } - + // Now create the actual result storm::storage::BitVector result(this->getNumberOfStates(), false); for (uint64_t state = 0; state < this->getNumberOfStates(); ++state) { @@ -71,7 +70,7 @@ namespace storm { result.set(state, true); } } - + return result; } diff --git a/src/storm/models/sparse/Smg.h b/src/storm/models/sparse/Smg.h index b16475c18..46e8699a8 100644 --- a/src/storm/models/sparse/Smg.h +++ b/src/storm/models/sparse/Smg.h @@ -34,7 +34,7 @@ namespace storm { storm::storage::PlayerIndex getPlayerOfState(uint64_t stateIndex) const; storm::storage::PlayerIndex getPlayerIndex(std::string const& playerName) const; storm::storage::BitVector computeStatesOfCoalition(storm::logic::PlayerCoalition const& coalition) const; - + private: // Assigns the controlling player to each state. // If a state has storm::storage::INVALID_PLAYER_INDEX, it shall be the case that the choice at that state is unique