|
|
@ -22,10 +22,8 @@ |
|
|
|
extern log4cplus::Logger logger; |
|
|
|
|
|
|
|
namespace storm { |
|
|
|
|
|
|
|
namespace utility { |
|
|
|
|
|
|
|
namespace graph { |
|
|
|
namespace utility { |
|
|
|
namespace graph { |
|
|
|
|
|
|
|
/*! |
|
|
|
* Performs a backwards breadt-first search trough the underlying graph structure |
|
|
@ -767,7 +765,7 @@ namespace graph { |
|
|
|
template<typename T> |
|
|
|
struct DistanceCompare { |
|
|
|
bool operator()(std::pair<T, uint_fast64_t> const& lhs, std::pair<T, uint_fast64_t> const& rhs) const { |
|
|
|
return lhs.first < rhs.first || (lhs.first == rhs.first && lhs.second < rhs.second); |
|
|
|
return lhs.first > rhs.first || (lhs.first == rhs.first && lhs.second > rhs.second); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@ -795,8 +793,8 @@ namespace graph { |
|
|
|
// Set the probability to 1 for all starting states. |
|
|
|
std::set<std::pair<T, uint_fast64_t>, DistanceCompare<T>> probabilityStateSet; |
|
|
|
for (auto state : startingStates) { |
|
|
|
probabilityStateSet.emplace(storm::utility::constGetZero<T>(), state); |
|
|
|
probabilities[state] = 1; |
|
|
|
probabilityStateSet.emplace(storm::utility::constGetOne<T>(), state); |
|
|
|
probabilities[state] = storm::utility::constGetOne<T>(); |
|
|
|
} |
|
|
|
|
|
|
|
// As long as there is one reachable state, we need to consider it. |
|
|
@ -837,10 +835,8 @@ namespace graph { |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
} // namespace graph |
|
|
|
|
|
|
|
} // namespace utility |
|
|
|
|
|
|
|
} // namespace graph |
|
|
|
} // namespace utility |
|
|
|
} // namespace storm |
|
|
|
|
|
|
|
#endif /* STORM_UTILITY_GRAPH_H_ */ |