#include <DGtal/base/SetFunctions.h>
template<typename Container>
struct DGtal::detail::SetFunctionsImpl< Container, false, true >
Specialization for non-associative, ordered containers. Could be a sorted std::vector or std::list.
Definition at line 646 of file SetFunctions.h.
◆ assignDifference()
template<typename Container >
Updates the set S1 as S1 - S2. This version uses the fact that the container is ordered.
- Parameters
-
[in,out] | S1 | an input set, S1 - S2 as output. |
[in] | S2 | another input set. |
Definition at line 691 of file SetFunctions.h.
693 typedef ComparatorAdapter< Container, false, true, false >
698 std::set_difference( S.begin(), S.end(), S2.begin(), S2.end(),
699 std::inserter( S1, S1.end() ),
700 CompAdapter::less( S1 ) );
◆ assignIntersection()
template<typename Container >
Updates the set S1 as \( S1 \cap S2 \). This version uses the fact that the container is ordered.
- Parameters
-
[in,out] | S1 | an input set, \( S1 \cap S2 \) as output. |
[in] | S2 | another input set. |
Definition at line 729 of file SetFunctions.h.
731 typedef ComparatorAdapter< Container, false, true, false >
736 std::set_intersection( S.begin(), S.end(), S2.begin(), S2.end(),
737 std::inserter( S1, S1.end() ),
738 CompAdapter::less( S1 ) );
◆ assignSymmetricDifference()
template<typename Container >
Updates the set S1 as \( S1 \Delta S2 \). This version uses the fact that the container is ordered.
- Parameters
-
[in,out] | S1 | an input set, \( S1 \Delta S2 \) as output. |
[in] | S2 | another input set. |
Definition at line 748 of file SetFunctions.h.
750 typedef ComparatorAdapter< Container, false, true, false >
755 std::set_symmetric_difference( S.begin(), S.end(), S2.begin(), S2.end(),
756 std::inserter( S1, S1.end() ),
757 CompAdapter::less( S1 ) );
◆ assignUnion()
template<typename Container >
Updates the set S1 as \( S1 \cup S2 \). This version uses the fact that the container is ordered.
- Parameters
-
[in,out] | S1 | an input set, \( S1 \cup S2 \) as output. |
[in] | S2 | another input set. |
Definition at line 710 of file SetFunctions.h.
712 typedef ComparatorAdapter< Container, false, true, false >
717 std::set_union( S.begin(), S.end(), S2.begin(), S2.end(),
718 std::inserter( S1, S1.end() ),
719 CompAdapter::less( S1 ) );
◆ isEqual()
template<typename Container >
Equality test. This version uses the fact that the container is ordered.
- Parameters
-
[in] | S1 | an input set. |
[in] | S2 | another input set. |
- Returns
- true iff S1 is equal to S2 (seen as sets).
Definition at line 655 of file SetFunctions.h.
657 typedef ComparatorAdapter< Container, false, true, false >
661 if ( S1.size() != S2.size() )
return false;
662 return std::equal( S1.begin(), S1.end(), S2.begin(),
663 CompAdapter::equal_to( S1 ) );
◆ isSubset()
template<typename Container >
Inclusion test. This version uses the fact that the container is ordered.
- Parameters
-
[in] | S1 | an input set. |
[in] | S2 | another input set. |
- Returns
- true iff S1 is a subset of S2.
Definition at line 674 of file SetFunctions.h.
676 typedef ComparatorAdapter< Container, false, true, false >
680 if ( S1.size() > S2.size() )
return false;
681 return std::includes( S2.begin(), S2.end(), S1.begin(), S1.end(),
682 CompAdapter::less( S1 ) );
The documentation for this struct was generated from the following file: