Browse Source

removed methods 'getPrecision' and 'getRelative' from the abstract MinMax solver interface. Not every solver needs these methods.

main
TimQu 8 years ago
parent
commit
499b25c3ea
  1. 5
      src/storm/solver/IterativeMinMaxLinearEquationSolver.h
  2. 12
      src/storm/solver/MinMaxLinearEquationSolver.h
  3. 4
      src/storm/solver/TopologicalMinMaxLinearEquationSolver.h

5
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;

12
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.

4
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;

Loading…
Cancel
Save