dehnert
9 years ago
5 changed files with 59 additions and 25 deletions
-
4src/generator/NextStateGenerator.h
-
7src/generator/PrismNextStateGenerator.cpp
-
21src/generator/PrismNextStateGenerator.h
-
17src/generator/StateBehavior.cpp
-
35src/generator/StateBehavior.h
@ -0,0 +1,17 @@ |
|||||
|
#include "src/generator/StateBehavior.h"
|
||||
|
|
||||
|
namespace storm { |
||||
|
namespace generator { |
||||
|
|
||||
|
template<typename ValueType, typename StateType> |
||||
|
void StateBehavior<ValueType, StateType>::addChoice(Choice<ValueType, StateType>&& choice) { |
||||
|
choices.push_back(std::move(choice)); |
||||
|
} |
||||
|
|
||||
|
template<typename ValueType, typename StateType> |
||||
|
void StateBehavior<ValueType, StateType>::addStateReward(ValueType const& stateReward) { |
||||
|
stateRewards.push_back(stateReward); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
#ifndef STORM_GENERATOR_PRISM_STATEBEHAVIOR_H_ |
||||
|
#define STORM_GENERATOR_PRISM_STATEBEHAVIOR_H_ |
||||
|
|
||||
|
#include <cstdint> |
||||
|
|
||||
|
#include "src/generator/Choice.h" |
||||
|
|
||||
|
namespace storm { |
||||
|
namespace generator { |
||||
|
|
||||
|
template<typename ValueType, typename StateType = uint32_t> |
||||
|
class StateBehavior { |
||||
|
public: |
||||
|
/*! |
||||
|
* Adds the given choice to the behavior of the state. |
||||
|
*/ |
||||
|
void addChoice(Choice<ValueType, StateType>&& choice); |
||||
|
|
||||
|
/*! |
||||
|
* Adds the given state reward to the behavior of the state. |
||||
|
*/ |
||||
|
void addStateReward(ValueType const& stateReward); |
||||
|
|
||||
|
private: |
||||
|
// The choices available in the state. |
||||
|
std::vector<Choice<ValueType, StateType>> choices; |
||||
|
|
||||
|
// The state rewards (under the different, selected reward models) of the state. |
||||
|
std::vector<ValueType> stateRewards; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
#endif /* STORM_GENERATOR_PRISM_STATEBEHAVIOR_H_ */ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue