DGtal 1.4.0
|
Aim: Specialize set operations (union, intersection, difference, symmetric_difference) according to the given type of container. It uses standard algorithms when containers are ordered, otherwise it provides a default implementation. More...
#include <DGtal/base/SetFunctions.h>
Static Public Member Functions | |
static bool | isEqual (const Container &S1, const Container &S2) |
static bool | isSubset (const Container &S1, const Container &S2) |
static Container & | assignDifference (Container &S1, const Container &S2) |
static Container & | assignUnion (Container &S1, const Container &S2) |
static Container & | assignIntersection (Container &S1, const Container &S2) |
static Container & | assignSymmetricDifference (Container &S1, const Container &S2) |
Aim: Specialize set operations (union, intersection, difference, symmetric_difference) according to the given type of container. It uses standard algorithms when containers are ordered, otherwise it provides a default implementation.
Description of template class 'SetFunctions'
Container | any type of container. |
associative | tells if the container is associative (e.g. set, map, unordered_set, unordered_map). |
ordered | tells if the container is ordered (e.g., set, map). |
Specialized implementations are marked with (S) in the list below.
|-----------------—|----------—|-------—|-------—|
Container | associative | ordered | pair |
---|---|---|---|
vector | false | false | false |
list | false | false | false |
(not valid) | false | false | true |
sorted vector (S) | false | true | false |
sorted list (S) | false | true | false |
set (S) | true | true | false |
map (S) | true | true | true |
unordered_set (S) | true | false | false |
unordered_map (S) | true | false | true |
Definition at line 234 of file SetFunctions.h.
|
inlinestatic |
Updates the set S1 as \( S1 - S2 \). This version does not use the fact that the container is ordered.
[in,out] | S1 | an input set, S1 - S2 as output. |
[in] | S2 | another input set. |
Definition at line 292 of file SetFunctions.h.
Referenced by DGtal::detail::SetFunctionsImpl< Container, true, false >::assignSymmetricDifference().
|
inlinestatic |
Updates the set S1 as \( S1 \cap S2 \). This version does not use the fact that the container is ordered.
[in,out] | S1 | an input set, \( S1 \cap S2 \) as output. |
[in] | S2 | another input set. |
Definition at line 340 of file SetFunctions.h.
Referenced by DGtal::detail::SetFunctionsImpl< Container, true, false >::assignSymmetricDifference().
|
inlinestatic |
Updates the set S1 as \( S1 \Delta S2 \). This version does not use the fact that the container is ordered.
[in,out] | S1 | an input set, \( S1 \Delta S2 \) as output. |
[in] | S2 | another input set. |
Definition at line 365 of file SetFunctions.h.
|
inlinestatic |
Updates the set S1 as \( S1 \cup S2 \). This version does not use the fact that the container is ordered.
[in,out] | S1 | an input set, \( S1 \cup S2 \) as output. |
[in] | S2 | another input set. |
Definition at line 316 of file SetFunctions.h.
Referenced by DGtal::detail::SetFunctionsImpl< Container, true, false >::assignSymmetricDifference().
|
inlinestatic |
Equality test. This version does not use the fact that the container is ordered.
[in] | S1 | an input set. |
[in] | S2 | another input set. |
Definition at line 243 of file SetFunctions.h.
|
inlinestatic |
Inclusion test. This version does not use the fact that the container is ordered.
[in] | S1 | an input set. |
[in] | S2 | another input set. |
Definition at line 268 of file SetFunctions.h.