Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
9cfc4082
Commit
9cfc4082
authored
Apr 05, 2012
by
Pierre PARUTTO
Committed by
Alexandre Duret-Lutz
Apr 12, 2012
Browse files
Modify is_accepting sba's method to run in constant time.
* src/tgba/tgbaexplicit.hh: modify is_accepting method
parent
eec3a12f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tgba/tgbaexplicit.hh
View file @
9cfc4082
...
...
@@ -721,21 +721,24 @@ namespace spot
{
}
/// Assume that an accepting state has only accepting output transitions
/// So we need only to check one to decide
virtual
bool
is_accepting
(
const
spot
::
state
*
s
)
const
{
bdd
acc
=
bddtrue
;
bool
transition
=
false
;
tgba_explicit_succ_iterator
<
State
>*
it
=
this
->
succ_iter
(
s
);
for
(
it
->
first
();
!
it
->
done
()
&&
acc
!=
bddfalse
;
it
->
next
())
it
->
first
();
// no transition
if
(
it
->
done
())
{
transition
=
true
;
acc
&=
it
->
current_acceptance_conditions
()
;
delete
it
;
return
false
;
}
bool
res
=
it
->
current_acceptance_conditions
()
!=
bddfalse
;
delete
it
;
return
acc
!=
bddfalse
&&
transition
;
return
res
;
}
private:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment