10namespace stateelimination {
12template<
typename ValueType>
15 std::vector<storm::storage::sparse::state_type>
const& statesToEliminate,
16 std::vector<ValueType>& stateValues)
19template<
typename ValueType>
23 :
StateEliminator<ValueType>(transitionMatrix, backwardTransitions), priorityQueue(priorityQueue), stateValues(stateValues) {}
25template<
typename ValueType>
30template<
typename ValueType>
33 stateValues[predecessor] =
37template<
typename ValueType>
39 priorityQueue->update(state);
42template<
typename ValueType>
44 while (priorityQueue->hasNext()) {
46 this->eliminateState(state, removeForwardTransitions);
47 if (removeForwardTransitions) {
48 clearStateValues(state);
53template<
typename ValueType>
55 stateValues[state] = storm::utility::zero<ValueType>();
virtual void updatePriority(storm::storage::sparse::state_type const &state) override
PrioritizedStateEliminator(storm::storage::FlexibleSparseMatrix< ValueType > &transitionMatrix, storm::storage::FlexibleSparseMatrix< ValueType > &backwardTransitions, PriorityQueuePointer priorityQueue, std::vector< ValueType > &stateValues)
virtual void clearStateValues(storm::storage::sparse::state_type const &state)
virtual void eliminateAll(bool eliminateForwardTransitions=true)
virtual void updateValue(storm::storage::sparse::state_type const &state, ValueType const &loopProbability) override
std::shared_ptr< StatePriorityQueue > PriorityQueuePointer
virtual void updatePredecessor(storm::storage::sparse::state_type const &predecessor, ValueType const &probability, storm::storage::sparse::state_type const &state) override
The flexible sparse matrix is used during state elimination.
ValueType simplify(ValueType value)