Polymake Template Library (PTL)
4.2
|
An associative container based on a balanced binary search (AVL) tree. Comparator
is a functor defining a total ordering on the element value domain. In most cases, the default choice (lexicographical order) will suffice for your needs.
More...
Public Member Functions | |
Set () | |
Create an empty set. | |
Set (const Comparator &cmp_arg) | |
Create an empty set with a non-default Comparator. | |
template<typename Iterator > | |
Set (Iterator &&src, Iterator &&end, std::enable_if_t< assess_iterator_value< Iterator, can_initialize, E >::value, std::nullptr_t >=nullptr) | |
Create a Set from an iterator. | |
Set (const GenericSet< Set, E, Comparator > &s) | |
Copy of a disguised Set object. | |
template<typename Set2 > | |
Set (const GenericSet< Set2, E, Comparator > &s) | |
Copy of an abstract set of the same element type. | |
template<typename Set2 , typename E2 , typename Comparator2 , typename = std::enable_if_t<can_initialize<E2, E>::value>> | |
Set (const GenericSet< Set2, E2, Comparator2 > &s) | |
Copy of an abstract set with element conversion. | |
void | clear () |
Make the set empty. | |
void | resize (Int) |
for compatibility with Bitset | |
void | swap (Set &s) |
Swap the content with another Set. More... | |
template<typename Permutation > | |
Set | copy_permuted (const Permutation &perm) const |
Return the (pointwise) image of this under a permutation. | |
template<typename Permutation > | |
Set | copy_permuted_inv (const Permutation &perm) const |
Return the (pointwise) image of this under the inverse of a given permutation. | |
Protected Member Functions | |
template<typename Iterator > | |
void | insert_from (Iterator &&src) |
Insert elements from a sequence, coming in any order. | |
An associative container based on a balanced binary search (AVL) tree. Comparator
is a functor defining a total ordering on the element value domain. In most cases, the default choice (lexicographical order) will suffice for your needs.
The data tree is attached to the Set object via a smart pointer. Arithmetic operations for sets are listed at operations.
The following standard functions for sets are also implemented:
contains(); empty(); size();