Browse Source

public access to model ingredients: RewardModel and exitRates

Former-commit-id: b8dbe8576e
tempestpy_adaptions
TimQu 9 years ago
parent
commit
a3aededd3a
  1. 5
      src/models/sparse/MarkovAutomaton.cpp
  2. 7
      src/models/sparse/MarkovAutomaton.h
  3. 29
      src/models/sparse/Model.h

5
src/models/sparse/MarkovAutomaton.cpp

@ -55,6 +55,11 @@ namespace storm {
return this->exitRates;
}
template <typename ValueType, typename RewardModelType>
std::vector<ValueType>& MarkovAutomaton<ValueType, RewardModelType>::getExitRates() {
return this->exitRates;
}
template <typename ValueType, typename RewardModelType>
ValueType const& MarkovAutomaton<ValueType, RewardModelType>::getExitRate(storm::storage::sparse::state_type state) const {
return this->exitRates[state];

7
src/models/sparse/MarkovAutomaton.h

@ -94,6 +94,13 @@ namespace storm {
*/
std::vector<ValueType> const& getExitRates() const;
/*!
* Retrieves the vector representing the exit rates of the states.
*
* @return The exit rate vector of the model.
*/
std::vector<ValueType>& getExitRates();
/*!
* Retrieves the exit rate of the given state.
*

29
src/models/sparse/Model.h

@ -140,6 +140,21 @@ namespace storm {
*/
storm::storage::SparseMatrix<ValueType>& getTransitionMatrix();
/*!
* Retrieves the reward models.
*
* @return A mapping from reward model names to the reward models.
*/
std::unordered_map<std::string, RewardModelType> const& getRewardModels() const;
/*!
* Retrieves the reward models.
*
* @return A mapping from reward model names to the reward models.
*/
std::unordered_map<std::string, RewardModelType>& getRewardModels();
/*!
* Retrieves whether the model has a reward model with the given name.
*
@ -318,20 +333,6 @@ namespace storm {
*/
void printRewardModelsInformationToStream(std::ostream& out) const;
/*!
* Retrieves the reward models.
*
* @return A mapping from reward model names to the reward models.
*/
std::unordered_map<std::string, RewardModelType> const& getRewardModels() const;
/*!
* Retrieves the reward models.
*
* @return A mapping from reward model names to the reward models.
*/
std::unordered_map<std::string, RewardModelType>& getRewardModels();
private:
// A matrix representing transition relation.
storm::storage::SparseMatrix<ValueType> transitionMatrix;

Loading…
Cancel
Save