Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Dtmc.cpp
Go to the documentation of this file.
7
8namespace storm {
9namespace models {
10namespace sparse {
11
12template<typename ValueType, typename RewardModelType>
14 storm::models::sparse::StateLabeling const& stateLabeling,
15 std::unordered_map<std::string, RewardModelType> const& rewardModels)
16 : Dtmc<ValueType, RewardModelType>(storm::storage::sparse::ModelComponents<ValueType, RewardModelType>(transitionMatrix, stateLabeling, rewardModels)) {
17 // Intentionally left empty
18}
19
20template<typename ValueType, typename RewardModelType>
22 std::unordered_map<std::string, RewardModelType>&& rewardModels)
24 storm::storage::sparse::ModelComponents<ValueType, RewardModelType>(std::move(transitionMatrix), std::move(stateLabeling), std::move(rewardModels))) {
25 // Intentionally left empty
26}
27
28template<typename ValueType, typename RewardModelType>
34template<typename ValueType, typename RewardModelType>
39
40template<typename ValueType, typename RewardModelType>
42 for (auto& rewardModel : this->getRewardModels()) {
43 rewardModel.second.reduceToStateBasedRewards(this->getTransitionMatrix(), true);
44 }
45}
46
47template class Dtmc<double>;
48
49#ifdef STORM_HAVE_CARL
50template class Dtmc<storm::RationalNumber>;
51
54template class Dtmc<storm::Interval>;
55#endif
56} // namespace sparse
57} // namespace models
58} // namespace storm
virtual void reduceToStateBasedRewards()=0
Converts the transition rewards of all reward models to state-based rewards.
The base class of all sparse deterministic models.
This class represents a discrete-time Markov chain.
Definition Dtmc.h:14
virtual void reduceToStateBasedRewards() override
Converts the transition rewards of all reward models to state-based rewards.
Definition Dtmc.cpp:41
Dtmc(storm::storage::SparseMatrix< ValueType > const &transitionMatrix, storm::models::sparse::StateLabeling const &stateLabeling, std::unordered_map< std::string, RewardModelType > const &rewardModels=std::unordered_map< std::string, RewardModelType >())
Constructs a model from the given data.
Definition Dtmc.cpp:13
CRewardModelType RewardModelType
Definition Model.h:36
This class manages the labeling of the state space with a number of (atomic) labels.
A class that holds a possibly non-square matrix in the compressed row storage format.
LabParser.cpp.
Definition cli.cpp:18