12namespace stateelimination {
14template<
typename ValueType>
17 std::vector<storm::storage::sparse::state_type>
const& statesToEliminate,
18 std::vector<ValueType>& stateValues)
21template<
typename ValueType>
25 :
StateEliminator<ValueType>(transitionMatrix, backwardTransitions), priorityQueue(priorityQueue), stateValues(stateValues) {}
27template<
typename ValueType>
32template<
typename ValueType>
35 stateValues[predecessor] =
39template<
typename ValueType>
41 priorityQueue->update(state);
44template<
typename ValueType>
46 while (priorityQueue->hasNext()) {
48 this->eliminateState(state, removeForwardTransitions);
49 if (removeForwardTransitions) {
50 clearStateValues(state);
55template<
typename ValueType>
57 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)