From 7bd9ef798f827e2f0c48305295b0dd6189d87cc9 Mon Sep 17 00:00:00 2001 From: TimQu Date: Tue, 18 Jul 2017 10:57:07 +0200 Subject: [PATCH] returning the memory structure of a scheduler --- src/storm/storage/Scheduler.cpp | 5 +++++ src/storm/storage/Scheduler.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/storm/storage/Scheduler.cpp b/src/storm/storage/Scheduler.cpp index a1dc1ecbd..7ddc7e457 100644 --- a/src/storm/storage/Scheduler.cpp +++ b/src/storm/storage/Scheduler.cpp @@ -86,6 +86,11 @@ namespace storm { return memoryStructure ? memoryStructure->getNumberOfStates() : 1; } + template + boost::optional const& Scheduler::getMemoryStructure() const { + return memoryStructure; + } + template void Scheduler::printToStream(std::ostream& out, std::shared_ptr> model, bool skipUniqueChoices) const { STORM_LOG_THROW(model == nullptr || model->getNumberOfStates() == schedulerChoices.front().size(), storm::exceptions::InvalidOperationException, "The given model is not compatible with this scheduler."); diff --git a/src/storm/storage/Scheduler.h b/src/storm/storage/Scheduler.h index c1c3a5f88..b51e308b9 100644 --- a/src/storm/storage/Scheduler.h +++ b/src/storm/storage/Scheduler.h @@ -70,6 +70,11 @@ namespace storm { * Retrieves the number of memory states this scheduler considers. */ uint_fast64_t getNumberOfMemoryStates() const; + + /*! + * Retrieves the memory structure associated with this scheduler + */ + boost::optional const& getMemoryStructure() const; /*! * Returns a copy of this scheduler with the new value type