Class mata::utils::SynchronizedUniversalIterator¶
-
template<typename Iterator>
class SynchronizedUniversalIterator : public mata::utils::SynchronizedIterator<Iterator>¶ Public Functions
-
inline virtual bool advance() override¶
Advances all positions to the NEXT minimum and returns true (though the next minimum might be the current state if synchronized_at_current_minimum is false), or returns false if positions cannot be synchronized.
If positions are synchronized to start with, then synchronized_at_current_minimum decides whether to stay or advance further. The general of the algorithm is to synchronize everybody with position[0].
-
inline virtual const std::vector<Iterator> &get_current() const override¶
Returns the vector of current positions.
-
inline virtual void reset(const size_t size = 0) override¶
Empties positions and ends.
Though they should keep the allocated space.
- Parameters:
size – Number of elements to reserve up-front for positions and ends.
Public Members
-
bool synchronized_at_current_minimum = false¶
“minimum” would be the smallest class bounded from below by all positions that appears in all OrdContainers.
Are we sure that all positions at this class? Invariant: it can be true only if all positions are indeed synchronized.
-
inline virtual bool advance() override¶