Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
IntervalterationHelper.h
Go to the documentation of this file.
1#pragma once
2
3#include <functional>
4#include <memory>
5#include <optional>
6#include <vector>
7
14
15namespace storm::solver::helper {
16
17template<typename ValueType>
18struct IIData {
19 std::vector<ValueType> const& x;
20 std::vector<ValueType> const& y;
22};
23
28template<typename ValueType, bool TrivialRowGrouping>
30 public:
32
33 template<OptimizationDirection Dir>
34 SolverStatus II(std::pair<std::vector<ValueType>, std::vector<ValueType>>& xy, std::vector<ValueType> const& offsets, uint64_t& numIterations,
35 bool relative, ValueType const& precision, std::function<SolverStatus(IIData<ValueType> const&)> const& iterationCallback = {},
36 std::optional<storm::storage::BitVector> const& relevantValues = {}) const;
37
38 SolverStatus II(std::vector<ValueType>& operand, std::vector<ValueType> const& offsets, uint64_t& numIterations, bool relative, ValueType const& precision,
39 std::function<void(std::vector<ValueType>&)> const& prepareLowerBounds,
40 std::function<void(std::vector<ValueType>&)> const& prepareUpperBounds, std::optional<storm::OptimizationDirection> const& dir = {},
41 std::function<SolverStatus(IIData<ValueType> const&)> const& iterationCallback = {},
42 std::optional<storm::storage::BitVector> const& relevantValues = {},
44
45 SolverStatus II(std::vector<ValueType>& operand, std::vector<ValueType> const& offsets, bool relative, ValueType const& precision,
46 std::function<void(std::vector<ValueType>&)> const& prepareLowerBounds,
47 std::function<void(std::vector<ValueType>&)> const& prepareUpperBounds, std::optional<storm::OptimizationDirection> const& dir = {},
48 std::function<SolverStatus(IIData<ValueType> const&)> const& iterationCallback = {},
49 std::optional<storm::storage::BitVector> const& relevantValues = {}) const;
50
51 private:
52 std::shared_ptr<ValueIterationOperator<ValueType, TrivialRowGrouping>> viOperator;
53};
54
55} // namespace storm::solver::helper
Helper class that optionally holds a reference to an object of type T.
Definition OptionalRef.h:48
IntervalIterationHelper(std::shared_ptr< ValueIterationOperator< ValueType, TrivialRowGrouping > > viOperator)
SolverStatus II(std::pair< std::vector< ValueType >, std::vector< ValueType > > &xy, std::vector< ValueType > const &offsets, uint64_t &numIterations, bool relative, ValueType const &precision, std::function< SolverStatus(IIData< ValueType > const &)> const &iterationCallback={}, std::optional< storm::storage::BitVector > const &relevantValues={}) const
This class represents the Value Iteration Operator (also known as Bellman operator).
constexpr NullRefType NullRef
Definition OptionalRef.h:31
std::vector< ValueType > const & y
std::vector< ValueType > const & x