20 #ifndef IDCLOSUREENUMERATOR_H_
21 #define IDCLOSUREENUMERATOR_H_
23 #include "../basic_types/IDPartitionEnumerator.h"
26 namespace rule_engine {
void reset()
Resets the computation of this enumerator, such that it will enumerate partitions beginning with the ...
Definition: IDClosureEnumerator.cpp:77
basic_types::IDPartition const & operator*() const
Return the last computed IDPartition.
Definition: IDClosureEnumerator.cpp:107
bool ended() const
Return whether the enumerator has ended, i.e.
Definition: IDClosureEnumerator.cpp:65
virtual ~IDClosureEnumerator()
Destroys this instance of the enumerator.
Definition: IDClosureEnumerator.cpp:56
IDClosureEnumerator(unordered_set< IDType > const &idSet, basic_types::IDPartition const &partition)
Generates a new IDClosureEnumerator for the given ID set and the given partition. ...
Definition: IDClosureEnumerator.cpp:29
This enumerator can be used to enumerate all equivalences on IDs, where the equivalence closure of th...
Definition: IDClosureEnumerator.h:36
bool finished
Stores whether the enumerator finished its computation or not.
Definition: IDClosureEnumerator.h:122
bool isValid() const
Returns whether the enumerator is still valid or not.
Definition: IDClosureEnumerator.cpp:61
Provides a possibility to enumerate all partitions on a given set of IDs.
Definition: IDPartitionEnumerator.h:66
IDClosureEnumerator & operator++()
Computes the next valid IDPartition.
Definition: IDClosureEnumerator.cpp:87
friend std::ostream & operator<<(std::ostream &ost, IDClosureEnumerator const &data)
Prints the most important contents of the given IDClosureEnumerator.
Definition: IDClosureEnumerator.cpp:115
void throwIfNotValid() const
Checks if the enumerator is valid and throws an exception if it is not.
Definition: IDClosureEnumerator.cpp:70
unordered_set< SubIDPartition > IDPartition
An IDPartition is a set of sets of IDs (which is effectively a set of equivalence classes)...
Definition: IDPartition.h:37
basic_types::IDPartitionEnumerator * enumerator
Stores an enumerator to enumerate all possible IDPartitions.
Definition: IDClosureEnumerator.h:112
const basic_types::IDPartition * otherPart
Stores the partition with which the equivalence closure will be formed.
Definition: IDClosureEnumerator.h:117