python: better binding for is_parity()

* wrap/python/spot_impl.i: Here.
* wrap/python/tests/acc_cond.ipynb: Document it.
* spot/twa/acc.cc (is_parity): Always initialize max.
This commit is contained in:
Alexandre Duret-Lutz 2015-12-17 11:46:46 +01:00
parent fd6ad9913f
commit 15131e74f2
3 changed files with 124 additions and 9 deletions

View file

@ -685,7 +685,10 @@ namespace spot
odd = !u_inf.has(0);
for (auto s: u_inf.sets())
if ((s & 1) != odd)
return false;
{
max = false; // just so the value is not uninitialized
return false;
}
auto max_code = acc_code::parity(true, odd, sets);
if (max_code == code_)