mark_t: sets() no longer returns a vector
spot::mark_t::sets() was modified so that it now returns an iterable object rather than an std::vector<unsigned>. * NEWS: Mention the modification. * python/spot/impl.i: Declares mark_container as iterable to SWIG. * spot/parseaut/parseaut.yy: Adapts to the modification. * spot/twa/acc.hh: Implement the modification. * tests/python/acc_cond.ipynb: Adapts to the modification.
This commit is contained in:
parent
9377db2e5e
commit
cc3bdfcd2e
5 changed files with 113 additions and 21 deletions
|
|
@ -787,6 +787,14 @@ def state_is_accepting(self, src) -> "bool":
|
|||
}
|
||||
}
|
||||
|
||||
%extend spot::internal::mark_container {
|
||||
swig::SwigPyIterator* __iter__(PyObject **PYTHON_SELF)
|
||||
{
|
||||
return swig::make_forward_iterator_np(self->begin(), self->begin(),
|
||||
self->end(), *PYTHON_SELF);
|
||||
}
|
||||
}
|
||||
|
||||
%extend spot::twa_graph {
|
||||
unsigned new_univ_edge(unsigned src, const std::vector<unsigned>& v,
|
||||
bdd cond, acc_cond::mark_t acc = 0U)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue