Browse Source

graph: Cycle check ignores Zero entries.

tempestpy_adaptions
Tim Quatmann 4 years ago
parent
commit
3a4af89b66
  1. 14
      src/storm/utility/graph.cpp

14
src/storm/utility/graph.cpp

@ -141,12 +141,14 @@ namespace storm {
if (unexploredStates.get(state)) {
unexploredStates.set(state, false);
for (auto const& entry : transitionMatrix.getRowGroup(state)) {
if (unexploredStates.get(entry.getColumn())) {
dfsStack.push_back(entry.getColumn());
} else {
if (!acyclicStates.get(entry.getColumn())) {
// The state has been visited before but is not known to be acyclic.
return true;
if (!storm::utility::isZero(entry.getValue())) {
if (unexploredStates.get(entry.getColumn())) {
dfsStack.push_back(entry.getColumn());
} else {
if (!acyclicStates.get(entry.getColumn())) {
// The state has been visited before but is not known to be acyclic.
return true;
}
}
}
}

Loading…
Cancel
Save