#include <DGtal/base/SetFunctions.h>
template<typename Container>
struct DGtal::detail::SetFunctionsImpl< Container, true, true >
Specialization for associative, ordered containers.
Definition at line 514 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 566 of file SetFunctions.h.
568 typedef ComparatorAdapter< Container,
true,
true,
569 IsPairAssociativeContainer< Container >::value >
574 std::set_difference( S.begin(), S.end(), S2.begin(), S2.end(),
575 std::inserter( S1, S1.end() ),
576 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 606 of file SetFunctions.h.
608 typedef ComparatorAdapter< Container,
true,
true,
609 IsPairAssociativeContainer< Container >::value >
614 std::set_intersection( S.begin(), S.end(), S2.begin(), S2.end(),
615 std::inserter( S1, S1.end() ),
616 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 626 of file SetFunctions.h.
628 typedef ComparatorAdapter< Container,
true,
true,
629 IsPairAssociativeContainer< Container >::value >
634 std::set_symmetric_difference( S.begin(), S.end(), S2.begin(), S2.end(),
635 std::inserter( S1, S1.end() ),
636 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 586 of file SetFunctions.h.
588 typedef ComparatorAdapter< Container,
true,
true,
589 IsPairAssociativeContainer< Container >::value >
594 std::set_union( S.begin(), S.end(), S2.begin(), S2.end(),
595 std::inserter( S1, S1.end() ),
596 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 524 of file SetFunctions.h.
527 if ( S1.size() != S2.size() )
return false;
531 typedef ComparatorAdapter< Container,
true,
true,
532 IsPairAssociativeContainer< Container >::value >
535 return std::equal( S1.begin(), S1.end(), S2.begin(),
536 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 547 of file SetFunctions.h.
550 if ( S1.size() > S2.size() )
return false;
551 typedef ComparatorAdapter< Container,
true,
true,
552 IsPairAssociativeContainer< Container >::value >
555 return std::includes( S2.begin(), S2.end(),
556 S1.begin(), S1.end(), CompAdapter::less( S1 ) );
The documentation for this struct was generated from the following file: