Storm 2.0.0.3
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
AffinePMdpDecomposition.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <set>
5#include <utility>
6#include <vector>
7
11
12namespace storm::pars::scp {
13
23 double constant;
24 std::vector<std::pair<storm::RationalFunctionVariable, double>> parameterCoefficients;
25};
26
34 uint64_t successor;
35 double constant;
36 std::vector<std::pair<storm::RationalFunctionVariable, double>> parameterCoefficients;
37};
38
49 public:
61
66 std::vector<UnpackedTransition> const& getRow(uint64_t row) const;
67
69 uint64_t getNumberOfRows() const;
70
76 UnpackedValue const& getReward(uint64_t row) const;
77
80 std::set<storm::RationalFunctionVariable> const& getParameters() const;
81
82 private:
90 UnpackedValue decomposeAffine(storm::RationalFunction const& value);
91
92 std::vector<std::vector<UnpackedTransition>> rows;
93 std::vector<UnpackedValue> rewardRows;
94 std::set<storm::RationalFunctionVariable> parameters;
95};
96
97} // namespace storm::pars::scp
Base class for all sparse models.
Definition Model.h:34
AffinePMdpDecomposition(storm::models::sparse::Model< storm::RationalFunction > const &model, storm::models::sparse::StandardRewardModel< storm::RationalFunction > const *rewardModel=nullptr)
std::set< storm::RationalFunctionVariable > const & getParameters() const
All parameters occurring anywhere in the model's transition matrix, or (if a reward model was given t...
uint64_t getNumberOfRows() const
The number of rows (matrix rows, i.e. choices) that were decomposed.
std::vector< UnpackedTransition > const & getRow(uint64_t row) const
The unpacked transitions of the given matrix row (a state for a DTMC, or a single state-action choice...
UnpackedValue const & getReward(uint64_t row) const
The affine decomposition of the reward accrued by taking the given matrix row, from the reward model ...
carl::RationalFunction< Polynomial, true > RationalFunction
The affine part of a single transition (row, successor): UnpackedValue plus which successor state it ...
std::vector< std::pair< storm::RationalFunctionVariable, double > > parameterCoefficients
The affine decomposition of a single scalar quantity, so that everything downstream only ever touches...
std::vector< std::pair< storm::RationalFunctionVariable, double > > parameterCoefficients