From 499b25c3ea15cc07f68d39401a31fd819d0138d7 Mon Sep 17 00:00:00 2001 From: TimQu <tim.quatmann@cs.rwth-aachen.de> Date: Tue, 1 Aug 2017 15:41:12 +0200 Subject: [PATCH] removed methods 'getPrecision' and 'getRelative' from the abstract MinMax solver interface. Not every solver needs these methods. --- .../solver/IterativeMinMaxLinearEquationSolver.h | 5 +++-- src/storm/solver/MinMaxLinearEquationSolver.h | 12 ------------ .../solver/TopologicalMinMaxLinearEquationSolver.h | 4 ++-- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h index 3d4f06156..301db3049 100644 --- a/src/storm/solver/IterativeMinMaxLinearEquationSolver.h +++ b/src/storm/solver/IterativeMinMaxLinearEquationSolver.h @@ -46,8 +46,9 @@ namespace storm { virtual void clearCache() const override; - virtual ValueType getPrecision() const override; - virtual bool getRelative() const override; + ValueType getPrecision() const; + bool getRelative() const; + private: bool solveEquationsPolicyIteration(OptimizationDirection dir, std::vector<ValueType>& x, std::vector<ValueType> const& b) const; bool solveEquationsValueIteration(OptimizationDirection dir, std::vector<ValueType>& x, std::vector<ValueType> const& b) const; diff --git a/src/storm/solver/MinMaxLinearEquationSolver.h b/src/storm/solver/MinMaxLinearEquationSolver.h index 7b4aa18a1..3b7574abe 100644 --- a/src/storm/solver/MinMaxLinearEquationSolver.h +++ b/src/storm/solver/MinMaxLinearEquationSolver.h @@ -115,18 +115,6 @@ namespace storm { */ std::vector<uint_fast64_t> const& getSchedulerChoices() const; - /** - * Gets the precision after which the solver takes two numbers as equal. - * - * @see getRelative() - */ - virtual ValueType getPrecision() const = 0; - - /** - * Gets whether the precision is taken to be absolute or relative - */ - virtual bool getRelative() const = 0; - /*! * Sets whether some of the generated data during solver calls should be cached. * This possibly decreases the runtime of subsequent calls but also increases memory consumption. diff --git a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h index 3a8ae9e26..fcbdcf988 100644 --- a/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h +++ b/src/storm/solver/TopologicalMinMaxLinearEquationSolver.h @@ -36,8 +36,8 @@ namespace storm { virtual void repeatedMultiply(OptimizationDirection dir, std::vector<ValueType>& x, std::vector<ValueType> const* b, uint_fast64_t n) const override; - virtual ValueType getPrecision() const override; - virtual bool getRelative() const override; + ValueType getPrecision() const; + bool getRelative() const; private: storm::storage::SparseMatrix<ValueType> const& A;