* src/tgba/tgba.hh, src/tgba/tgba.cc
(tgba::number_of_acceptance_conditions): New method. * src/tgbaalgos/lbtt.cc (lbtt_bfs::lbtt_bfs): Use it.
This commit is contained in:
parent
1d3100607a
commit
d60025dcd1
4 changed files with 28 additions and 11 deletions
|
|
@ -25,7 +25,8 @@ namespace spot
|
|||
{
|
||||
tgba::tgba()
|
||||
: last_support_conditions_input_(0),
|
||||
last_support_variables_input_(0)
|
||||
last_support_variables_input_(0),
|
||||
num_acc_(-1)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -75,4 +76,21 @@ namespace spot
|
|||
return "";
|
||||
}
|
||||
|
||||
int
|
||||
tgba::number_of_acceptance_conditions() const
|
||||
{
|
||||
if (num_acc_ < 0)
|
||||
{
|
||||
bdd all = all_acceptance_conditions();
|
||||
int n = 0;
|
||||
while (all != bddfalse)
|
||||
{
|
||||
++n;
|
||||
all -= bdd_satone(all);
|
||||
}
|
||||
num_acc_ = n;
|
||||
}
|
||||
return num_acc_;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue