summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2013-06-24 09:31:17 (GMT)
committerJan Huwald <jh@sotun.de>2013-06-24 09:31:17 (GMT)
commitb17c7882e6dd83f728f11e11611f1f925556ba09 (patch)
tree2f40b1b5b0fd7eaf047368014afc28675ca29330
parent21d9e26dfb72ba6d0fa4f3f40a439e51d943d349 (diff)
skip unneccessary loops in findCycle
-rw-r--r--cacount.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cacount.cpp b/cacount.cpp
index f135936..7b59563 100644
--- a/cacount.cpp
+++ b/cacount.cpp
@@ -94,11 +94,11 @@ void init(Trans &t, Trans &c, pbitset &reachable) {
void findCycle(Trans &t, Trans &c) {
// forward to t=numState; now every state is in a cycle
- iterTrans(logState, [&](State s) {
+ iterTransP(logState, [&](State s, bool &worked) {
State n = t[s];
t[s] = t[n];
c[s] = min<State>(c[s], c[n]);
- // TODO: detect if anything change, skip later rounds then
+ if (n != t[s]) worked = true;
}, (string) "fwd time", true);
// Transients may have a cycle id (minimum state) that is on the
// transient (not in the cycle) and thus different from the cycle id
contact: Jan Huwald // Impressum