|
Polymake Template Library (PTL) 4.13
|
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...
#include <Set.h>


Public Types | |
| using | element_type |
| element types | |
| using | element_comparator |
| functor type for comparing elements | |
| using | generic_type |
| generic type | |
| using | top_type |
| top type | |
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. | |
| 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. | |
| std::enable_if_t< is_compatible_set< Right >::value, top_type & > | operator+= (const Right &x) |
| Set union | |
| std::enable_if_t< is_compatible_element< Right >::value, bool > | collect (const Right &x) |
| Add to the set, report true if existed formerly. | |
| std::enable_if_t< is_compatible_set< Right >::value, top_type & > | operator-= (const Right &x) |
| Set difference | |
| std::enable_if_t< is_compatible_set< Right >::value, top_type & > | operator*= (const Right &x) |
| Set intersection | |
| std::enable_if_t< is_compatible_set< Right >::value, top_type & > | operator^= (const Right &x) |
| Symmetrical difference. | |
| std::enable_if_t< is_compatible_set< Right >::value, Set< E, Comparator > > | extract_symdif (const Right &x) |
| Compute the symmetrical difference and make *this equal to s. | |
| bool | operator== (const GenericSet< Set2, E, Comparator > &s) const |
| comparison | |
| bool | operator< (const GenericSet< Set2, E, Comparator > &s) const |
| lexicographical comparison | |
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();