21#include <spot/twa/twagraph.hh>
46 template<
bool subsumed>
51 : labels_(labels), cond_(cond)
59 std::vector<bdd>::const_iterator pos_;
60 std::vector<bdd>
const& labels_;
65 iterator(
const std::vector<bdd>& labels, bdd cond)
66 : labels_(labels), cond_(cond)
68 pos_ = labels_.begin();
86 while (pos_ != labels_.end() &&
87 ((subsumed && !bdd_implies(*pos_, cond_))
88 || (!subsumed && (*pos_ & cond_) == bddfalse)))
104 return pos_ == other.pos_;
110 return pos_ != other.pos_;
133 std::vector<bdd>::const_iterator
end()
const
135 return labels_.end();
139 const std::vector<bdd>& labels_;
181 unsigned long max_label);
208 return {basis_, label};
221 return {basis_, label};
228 return basis_.size();
232 const std::vector<bdd>&
basis()
const
238 std::vector<bdd> basis_{bddtrue};
239 std::set<formula> aps_;
Iterator over edge labels compatible with the filter's BDD condition.
Definition split.hh:58
iterator(const std::vector< bdd > &labels, bdd cond)
Construct an iterator over matching labels.
Definition split.hh:65
bool operator!=(std::vector< bdd >::const_iterator pos) const
Check inequality with a vector iterator.
Definition split.hh:120
bool operator!=(const iterator &other) const
Check inequality with another iterator.
Definition split.hh:108
bdd operator*() const
Dereference to get the current label.
Definition split.hh:93
iterator & operator++()
Advance to the next matching label.
Definition split.hh:73
bool operator==(const iterator &other) const
Check equality with another iterator.
Definition split.hh:102
void next()
Advance to the next matching label (implementation).
Definition split.hh:81
bool operator==(std::vector< bdd >::const_iterator pos) const
Check equality with a vector iterator.
Definition split.hh:114
separate edges so that their labels are disjoint
Definition split.hh:160
bool add_to_basis(const const_twa_graph_ptr &aut, unsigned long max_label)
add label(s) to a basis
edge_separator_filter< true > separate_implying(bdd label)
Separate a label.
Definition split.hh:206
const std::vector< bdd > & basis() const
Return the basis vector.
Definition split.hh:232
twa_graph_ptr separate_implying(const const_twa_graph_ptr &aut)
Separate an automaton.
void add_to_basis(bdd label)
add label(s) to a basis
void add_to_basis(const const_twa_graph_ptr &aut)
add label(s) to a basis
unsigned basis_size() const
Return the number of basis elements.
Definition split.hh:226
twa_graph_ptr separate_compat(const const_twa_graph_ptr &aut)
Separate an automaton.
edge_separator_filter< false > separate_compat(bdd label)
Separate a label.
Definition split.hh:219
twa_graph_ptr split_edges(const const_twa_graph_ptr &aut)
Transform edges into transitions.
twa_graph_ptr separate_edges(const const_twa_graph_ptr &aut)
Make edge labels disjoint.
std::shared_ptr< twa_graph > twa_graph_ptr
Shared pointer to a mutable twa_graph.
Definition fwd.hh:44
std::shared_ptr< const twa_graph > const_twa_graph_ptr
Shared pointer to a const twa_graph.
Definition fwd.hh:41
Definition automata.hh:26
A filter for iterating over edge labels compatible with a given BDD condition.
Definition split.hh:48
edge_separator_filter(const std::vector< bdd > &labels, bdd cond)
Construct a filter from the given label basis and condition.
Definition split.hh:50
iterator begin() const
Return an iterator to the first matching label.
Definition split.hh:127
std::vector< bdd >::const_iterator end() const
Return an iterator past the last label.
Definition split.hh:133