|
|
@ -81,8 +81,23 @@ namespace storm { |
|
|
|
// To eliminate the remaining one-state SCCs, we need to keep track of them.
|
|
|
|
storm::storage::BitVector remainingStates(scc); |
|
|
|
|
|
|
|
// And then recursively treat all sub-SCCs.
|
|
|
|
for (auto const& newScc : decomposition) { |
|
|
|
// Store a bit vector of remaining SCCs so we can be flexible when it comes to the order in which
|
|
|
|
// we eliminate the SCCs.
|
|
|
|
storm::storage::BitVector remainingSccs(decomposition.size(), true); |
|
|
|
|
|
|
|
// First, get rid of the trivial SCCs.
|
|
|
|
for (uint_fast64_t sccIndex = 0; sccIndex < decomposition.size(); ++sccIndex) { |
|
|
|
storm::storage::StronglyConnectedComponent const& scc = decomposition.getBlock(sccIndex); |
|
|
|
if (scc.isTrivial()) { |
|
|
|
storm::storage::sparse::state_type onlyState = *scc.begin(); |
|
|
|
eliminateState(matrix, oneStepProbabilities, onlyState, backwardTransitions); |
|
|
|
remainingSccs.set(sccIndex, false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// And then recursively treat the remaining sub-SCCs.
|
|
|
|
for (auto sccIndex : remainingSccs) { |
|
|
|
storm::storage::StronglyConnectedComponent const& newScc = decomposition.getBlock(sccIndex); |
|
|
|
// If the SCC consists of just one state, we do not explore it recursively, but rather eliminate
|
|
|
|
// it directly.
|
|
|
|
if (newScc.size() == 1) { |
|
|
|