Defined in File Cover.hpp
Implements a cover of a set, i.e. an assignment of its elements to possibly overlapping subsets.
Public Functions
Default constructor
Create a new cover data structure for elements up to a maximum element index.
z – [in] maximum index
Creates a new cover data structure which contains the given partition.
p – [in] The partition to construct the cover from
Index operator for const instances of this class.
e – [in] an element
Return the ids of subsets in which the element e is contained.
e – [in] an element
A set of subset ids in which e is contained.
Check if cover assigns a valid subset to the element e.
e – an element.
true
, if e is assigned to a valid subset, false
otherwise.
Check if two elements e1 and e2 belong to the same subset.
e1 – an element.
e2 – an element.
true
, if e1 and e2 belong to the same subset, false
otherwise.
Get the members of a specific subset s.
The set of members of subset s.
Add the (previously unassigned) element e to the set s.
s – [in] a subset
e – [in] an element
Remove the element e from the set s.
s – [in] a subset
e – [in] an element
Move the element e to subset s, i.e. remove it from all other subsets and place it in the subset.
s – [in] a subset
e – [in] an element
Creates a singleton set containing the element e and returns the index of the new set.
e – [in] an element
The index of the new set.
Assigns every element to a singleton set. Set id is equal to element id.
Assigns the elements from both sets to a new set.
s – [in] a subset
t – [in] a subset
Get an upper bound for the subset ids that have been assigned. (This is the maximum id + 1.)
An upper bound.
Get a lower bound for the subset ids that have been assigned.
A lower bound.
Get a list of subset sizes. Indices do not necessarily correspond to subset ids.
A list of subset sizes.
Get a map from subset id to size of the subset.
A map from subset id to size of the subset.
Get the current number of sets in this cover.
The number of sets in this cover.
Get the current number of elements in this cover.
The current number of elements.
Get the ids of nonempty subsets.
A set of ids of nonempty subsets.
Sets an upper bound for the subset ids that CAN be assigned.
upper – [in] highest assigned subset ID + 1