Clingo
|
Helper class to manage generation counts. More...
#include <base.hh>
Public Member Functions | |
auto | begin (MatcherType type) const -> size_t |
Update the generation counts. | |
auto | end (MatcherType type) const -> size_t |
Get the index plus one of the last atom in the given generation. | |
auto | contains (size_t index, MatcherType type) const -> bool |
Check if the given index belongs to the given generation. | |
auto | has_update (size_t size) const -> bool |
Check if there is an update. | |
void | update (size_t generation, size_t size) |
Update the current generations. | |
Helper class to manage generation counts.
Old, new, and the all generation are considered. The latter is the union of the prior.
|
inline |
Update the generation counts.
Calling with generation zero resets the counts. Calling with a generation greater than the current generation adds all atoms from the current all generation to the old generation.
Calling the function multiple times for the same generation has no effect. Get the index of the first atom in the given generation.
|
inline |
Update the current generations.
Generations should always increase. They can however be reset by setting the generation to 0.