From edec805e37184199bf02dd0fbdb2b22fb05ab568 Mon Sep 17 00:00:00 2001 From: dehnert Date: Wed, 8 Nov 2017 15:19:47 +0100 Subject: [PATCH] added some missing clone functions for check results --- src/storm-pars/modelchecker/results/RegionCheckResult.cpp | 6 +++++- src/storm-pars/modelchecker/results/RegionCheckResult.h | 2 ++ .../modelchecker/results/RegionRefinementCheckResult.cpp | 5 +++++ .../modelchecker/results/RegionRefinementCheckResult.h | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/storm-pars/modelchecker/results/RegionCheckResult.cpp b/src/storm-pars/modelchecker/results/RegionCheckResult.cpp index 2759034e9..fbfc95bbb 100644 --- a/src/storm-pars/modelchecker/results/RegionCheckResult.cpp +++ b/src/storm-pars/modelchecker/results/RegionCheckResult.cpp @@ -27,6 +27,11 @@ namespace storm { initFractions(overallArea); } + template + std::unique_ptr RegionCheckResult::clone() const { + return std::make_unique>(this->regionResults); + } + template bool RegionCheckResult::isRegionCheckResult() const { return true; @@ -108,7 +113,6 @@ namespace storm { // Filtering has no effect as we only store the result w.r.t. a single state anyway. // Hence, this is intentionally left empty. } - #ifdef STORM_HAVE_CARL template class RegionCheckResult; diff --git a/src/storm-pars/modelchecker/results/RegionCheckResult.h b/src/storm-pars/modelchecker/results/RegionCheckResult.h index 7bb144cf6..025a6ad66 100644 --- a/src/storm-pars/modelchecker/results/RegionCheckResult.h +++ b/src/storm-pars/modelchecker/results/RegionCheckResult.h @@ -29,6 +29,8 @@ namespace storm { virtual void filter(QualitativeCheckResult const& filter) override; + virtual std::unique_ptr clone() const override; + protected: virtual void initFractions(typename storm::storage::ParameterRegion::CoefficientType const& overallArea); diff --git a/src/storm-pars/modelchecker/results/RegionRefinementCheckResult.cpp b/src/storm-pars/modelchecker/results/RegionRefinementCheckResult.cpp index 605865c04..320dda2e8 100644 --- a/src/storm-pars/modelchecker/results/RegionRefinementCheckResult.cpp +++ b/src/storm-pars/modelchecker/results/RegionRefinementCheckResult.cpp @@ -29,6 +29,11 @@ namespace storm { storm::storage::ParameterRegion const& RegionRefinementCheckResult::getParameterSpace() const { return parameterSpace; } + + template + std::unique_ptr RegionRefinementCheckResult::clone() const { + return std::make_unique>(this->regionResults, this->parameterSpace); + } template std::ostream& RegionRefinementCheckResult::writeIllustrationToStream(std::ostream& out) const { diff --git a/src/storm-pars/modelchecker/results/RegionRefinementCheckResult.h b/src/storm-pars/modelchecker/results/RegionRefinementCheckResult.h index 8b37afcca..2b6b6b617 100644 --- a/src/storm-pars/modelchecker/results/RegionRefinementCheckResult.h +++ b/src/storm-pars/modelchecker/results/RegionRefinementCheckResult.h @@ -21,7 +21,8 @@ namespace storm { storm::storage::ParameterRegion const& getParameterSpace() const; virtual std::ostream& writeIllustrationToStream(std::ostream& out) const override; - + + virtual std::unique_ptr clone() const override; protected: storm::storage::ParameterRegion parameterSpace;