Loading...
Searching...
No Matches
container_utils.h File Reference
#include <set>
+ Include dependency graph for container_utils.h:
+ This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Compute union of two sets.
Function Documentation
◆ util_inplace_set_union()
Compute union of two sets.
This function has complexity O(max(n1, n2)), with n1, n2 being the sizes of the sets of which the union is formed. This is in contrast to target.insert(source.begin(), source.end()) which has complexity O(n2 * log(n1 + n2)).
- Template Parameters
-
T value type of the sets
Compare comparison predicate of the sets
Alloc allocator of the sets
- Parameters
-
target first input set, will contain the result of the union
source second input set
- Returns
- true iff
target was changed
Definition at line 28 of file container_utils.h.