Class mata::nfa::SynchronizedExistentialSymbolPostIterator

class SynchronizedExistentialSymbolPostIterator : public SynchronizedExistentialIterator<utils::OrdVector<SymbolPost>::const_iterator>

Specialization of utils::SynchronizedExistentialIterator for iterating over SymbolPosts.

Public Functions

StateSet unify_targets() const

Get union of all targets.

bool synchronize_with(const SymbolPost &sync)

Synchronize with the given SymbolPost sync.

Alignes the synchronized iterator to the same symbol as sync.

Returns:

True iff the synchronized iterator points to the same symbol as sync.

bool synchronize_with(Symbol sync_symbol)

Synchronize with the given symbol sync_symbol.

Alignes the synchronized iterator to the same symbol as sync_symbol.

Returns:

True iff the synchronized iterator points to the same symbol as sync.

inline virtual bool advance() override

Advances all positions just above current_minimum, that is, to or above next_minimum.

Those at next_minimum are added to currently_synchronized. Since next_minimum becomes the current minimum, new next_minimum must be updated too.

inline virtual const std::vector<utils::OrdVector<SymbolPost>::const_iterator> &get_current() const override

Returns the vector of current still active positions.

Beware, they will be ordered differently from how there were input into the iterator. This is due to swapping of the emptied positions with positions at the end.

inline virtual void push_back(const utils::OrdVector<SymbolPost>::const_iterator &begin, const utils::OrdVector<SymbolPost>::const_iterator &end) override

This is supposed to be called only before an iteration, after constructor of reset.

Calling after advance breaks the iterator. Specifies begin and end of one vector, to initialise before the iteration starts.