Confluent Sets and Maps
Public Types | Public Member Functions | List of all members
confluent::set< T, Compare, Hash, Equal > Class Template Reference

Public Types

typedef T key_type
 
typedef T value_type
 
typedef set_provider< T, Compare, Hash, Equal > provider_type
 
typedef std::shared_ptr< provider_typeprovider_ptr
 
typedef confluent::iterator< traits > iterator
 
typedef std::reverse_iterator< iterator > reverse_iterator
 

Public Member Functions

 set (provider_ptr provider=provider_type::default_provider())
 
template<class InputIterator >
 set (InputIterator first, InputIterator last, provider_ptr provider=provider_type::default_provider())
 
 set (std::initializer_list< value_type > ilist, provider_ptr provider=provider_type::default_provider())
 
 set (iterator first, iterator last)
 
 set (const set &other)
 
 set (set &&other)
 
size_t insert (const value_type &value)
 
template<class InputIterator >
size_t insert (InputIterator first, InputIterator last)
 
size_t insert (std::initializer_list< value_type > ilist)
 
size_t insert (const set &other)
 
size_t erase (const key_type &key)
 
size_t erase (iterator first, iterator last)
 
size_t erase (const set &other)
 
size_t retain (iterator first, iterator last)
 
size_t retain (const set &other)
 
void clear ()
 
void swap (set &other)
 
setoperator= (const set &other)
 
setoperator= (set &&other)
 
setoperator= (std::initializer_list< value_type > ilist)
 
set operator| (const set &rhs) const
 
setoperator|= (const set &rhs)
 
set operator& (const set &rhs) const
 
setoperator&= (const set &rhs)
 
set operator- (const set &rhs) const
 
setoperator-= (const set &rhs)
 
set operator^ (const set &rhs) const
 
setoperator^= (const set &rhs)
 
iterator begin () const
 
iterator end () const
 
iterator cbegin () const
 
iterator cend () const
 
reverse_iterator rbegin () const
 
reverse_iterator rend () const
 
iterator find (const key_type &key) const
 
iterator lower_bound (const key_type &key) const
 
iterator upper_bound (const key_type &key) const
 
std::pair< iterator, iterator > equal_range (const key_type &key) const
 
const value_type & at_index (size_t k) const
 
size_t count (const key_type &key) const
 
bool includes (const set &other) const
 
const provider_ptr & provider () const
 
bool empty () const
 
size_t size () const
 
size_t hash () const
 
bool operator== (const set &rhs) const
 
bool operator!= (const set &rhs) const
 

Detailed Description

template<class T, class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
class confluent::set< T, Compare, Hash, Equal >

The class confluent::set is a sorted associative container whose instances share nodes with other sets and maps using the same set_provider.

Cloning sets and testing sets for equal content run in constant time. Merge operations such as set union, set intersection and set difference perform at optimal cost not only when one of the input sets is smaller than the other, but also when the number of elements that differ between the inputs set is small.

Contained elements must be comparable, hashable and copy-constructible and documented performance is based on that such operations are constant in time and memory and that hash collisions are rare.

Examples
CustomValueType.cc, and PhoneNumbers.cc.

Constructor & Destructor Documentation

◆ set() [1/6]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
confluent::set< T, Compare, Hash, Equal >::set ( provider_ptr  provider = provider_type::default_provider())
inline

Creates a new set.

Parameters
providerset_provider to use for this set (optional)

Complexity: Constant in time and memory.

◆ set() [2/6]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
template<class InputIterator >
confluent::set< T, Compare, Hash, Equal >::set ( InputIterator  first,
InputIterator  last,
provider_ptr  provider = provider_type::default_provider() 
)
inline

Creates a new set from a range of elements.

Parameters
firstrange start
lastrange end
providerset_provider to use for this set (optional)

Complexity: O(n log n) expected time on random input. O(n) on presorted input. O(n) in memory.

◆ set() [3/6]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
confluent::set< T, Compare, Hash, Equal >::set ( std::initializer_list< value_type >  ilist,
provider_ptr  provider = provider_type::default_provider() 
)
inline

Creates a new set from an initializer_list.

Parameters
ilistthe list of elements to include in the created set
providerset_provider to use for this set (optional)

Complexity: O(n log n) expected time on random input. O(n) on presorted input. O(n) in memory.

◆ set() [4/6]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
confluent::set< T, Compare, Hash, Equal >::set ( iterator  first,
iterator  last 
)
inline

Creates a new set from a range in another set.

The created set will use the same set_provider as the source set.

Parameters
firstrange start
lastrange end

Complexity: O(log n) expected time and memory.

◆ set() [5/6]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
confluent::set< T, Compare, Hash, Equal >::set ( const set< T, Compare, Hash, Equal > &  other)
inline

Creates a new set as a copy of another set.

The created set will use the same set_provider as the source set.

Parameters
otherother set

Complexity: Constant in time and memory.

◆ set() [6/6]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
confluent::set< T, Compare, Hash, Equal >::set ( set< T, Compare, Hash, Equal > &&  other)
inline

Creates a new set by moving content from another set.

The created set will use the same set_provider as the source set.

Result is undefined if the other set is used after content has been moved.

Parameters
otherother set

Complexity: Constant in time and memory.

Member Function Documentation

◆ insert() [1/4]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::insert ( const value_type &  value)
inline

Inserts an element into this set.

The new element is inserted if it is not contained before.

Parameters
valueelement to insert
Returns
the number of inserted elements

Complexity: O(log n) expected time and memory.

◆ insert() [2/4]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
template<class InputIterator >
size_t confluent::set< T, Compare, Hash, Equal >::insert ( InputIterator  first,
InputIterator  last 
)
inline

Inserts a range of elements into this set.

New element are inserted if they are not contained before.

Parameters
firstrange start
lastrange end
Returns
the number of inserted elements

Complexity: Same cost as first creating a set from the given range and then inserting the created set into this set.

◆ insert() [3/4]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::insert ( std::initializer_list< value_type >  ilist)
inline

Inserts elements from an initializer_list into this set.

New element are inserted if they are not contained before.

Parameters
ilistthe list of elements to insert
Returns
the number of inserted elements

Complexity: Same cost as first creating a set from the given initializer_list and then inserting the created set into this set.

◆ insert() [4/4]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::insert ( const set< T, Compare, Hash, Equal > &  other)
inline

Inserts elements in another set into this set.

New element are inserted if they are not contained before.

Result is undefined if not both sets are using the same set_provider.

Parameters
otherother set to insert elements from
Returns
the number of inserted elements

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

◆ erase() [1/3]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::erase ( const key_type &  key)
inline

Erases an element from this set.

The given element is erased if contained in the set.

Parameters
keyelement to erase
Returns
the number of erased elements

Complexity: O(log n) expected time and memory.

◆ erase() [2/3]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::erase ( iterator  first,
iterator  last 
)
inline

Erases a range of elements from this set.

The given range must be a range in this set.

Parameters
firstrange start
lastrange end
Returns
the number of erased elements

Complexity: O(log n) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ erase() [3/3]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::erase ( const set< T, Compare, Hash, Equal > &  other)
inline

Erases elements in another set from this set.

After the operation this set will contain the set difference, i.e. all elements that were present in this set but not in the other set.

Result is undefined if not both sets are using the same set_provider.

Parameters
otherother set to erase elements from
Returns
the number of erased elements

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ retain() [1/2]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::retain ( iterator  first,
iterator  last 
)
inline

Retains a range of elements.

The given range must be a range in this set.

After the operation this set will contain the elements in the range.

Parameters
firstrange start
lastrange end
Returns
the number of erased elements

Complexity: O(log n) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ retain() [2/2]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::retain ( const set< T, Compare, Hash, Equal > &  other)
inline

Retains elements that are contained in another set.

After the operation this set will contain the set intersection, i.e. all elements that were present in this set and also in the other set.

Result is undefined if not both sets are using the same set_provider.

Parameters
otherother set whose elements should be retained
Returns
the number of erased elements

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ clear()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
void confluent::set< T, Compare, Hash, Equal >::clear ( )
inline

Erases all elements in this set.

Complexity: Constant in time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ swap()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
void confluent::set< T, Compare, Hash, Equal >::swap ( set< T, Compare, Hash, Equal > &  other)
inline

Swaps the content of this set with the content of another set.

Complexity: Constant in time and memory.

◆ operator=() [1/3]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set& confluent::set< T, Compare, Hash, Equal >::operator= ( const set< T, Compare, Hash, Equal > &  other)
inline

Replaces the content of this set with the content of another set.

After the operation this set will use the same provider as the other set.

Complexity: Constant in time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ operator=() [2/3]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set& confluent::set< T, Compare, Hash, Equal >::operator= ( set< T, Compare, Hash, Equal > &&  other)
inline

Replaces the content of this set with the content of another set.

After the operation this set will use the same provider as the other set used before the operation.

Result is undefined if the other set is used after content has been moved.

Complexity: Constant in time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ operator=() [3/3]

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set& confluent::set< T, Compare, Hash, Equal >::operator= ( std::initializer_list< value_type >  ilist)
inline

Replaces the content of this set with elements from an initializer_list.

Parameters
ilistthe list of elements to assign

Complexity: O(n log n) expected time on random input. O(n) on presorted input. O(n) in memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ operator|()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set confluent::set< T, Compare, Hash, Equal >::operator| ( const set< T, Compare, Hash, Equal > &  rhs) const
inline

Returns the union of this set and another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
rhsother set to merge with this set
Returns
a set containing all elements in this set and in the other set

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

◆ operator|=()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set& confluent::set< T, Compare, Hash, Equal >::operator|= ( const set< T, Compare, Hash, Equal > &  rhs)
inline

Replaces the content of this set with the union of this set and another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
rhsother set to merge with this set
Returns
a reference to this set after it has been updated

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

◆ operator&()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set confluent::set< T, Compare, Hash, Equal >::operator& ( const set< T, Compare, Hash, Equal > &  rhs) const
inline

Returns the intersection of this set and another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
rhsother set to merge with this set
Returns
a set containing all elements in this set and in the other set

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ operator&=()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set& confluent::set< T, Compare, Hash, Equal >::operator&= ( const set< T, Compare, Hash, Equal > &  rhs)
inline

Replaces the content of this set with the intersection of this set and another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
rhsother set to merge with this set
Returns
a reference to this set after it has been updated

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ operator-()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set confluent::set< T, Compare, Hash, Equal >::operator- ( const set< T, Compare, Hash, Equal > &  rhs) const
inline

Returns the difference of this set and another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
rhsother set to merge with this set
Returns
a set containing all elements in this set and in the other set

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ operator-=()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set& confluent::set< T, Compare, Hash, Equal >::operator-= ( const set< T, Compare, Hash, Equal > &  rhs)
inline

Replaces the content of this set with the difference of this set and another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
rhsother set to merge with this set
Returns
a reference to this set after it has been updated

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ operator^()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set confluent::set< T, Compare, Hash, Equal >::operator^ ( const set< T, Compare, Hash, Equal > &  rhs) const
inline

Returns the symmetric difference of this set and another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
rhsother set to merge with this set
Returns
a set containing all elements in this set and in the other set

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ operator^=()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
set& confluent::set< T, Compare, Hash, Equal >::operator^= ( const set< T, Compare, Hash, Equal > &  rhs)
inline

Replaces the content of this set with the symmetric difference of this set and another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
rhsother set to merge with this set
Returns
a reference to this set after it has been updated

Let n be the size of the larger set. Let m be the size of the smaller set. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: This operation might cause destruction of unused nodes, but the cost of destructing nodes is always covered by the cost of creating them.

◆ begin()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
iterator confluent::set< T, Compare, Hash, Equal >::begin ( ) const
inline

Returns an iterator to the beginning of this set.

◆ end()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
iterator confluent::set< T, Compare, Hash, Equal >::end ( ) const
inline

Returns an iterator to the end of this set.

◆ cbegin()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
iterator confluent::set< T, Compare, Hash, Equal >::cbegin ( ) const
inline

Returns an iterator to the beginning of this set.

◆ cend()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
iterator confluent::set< T, Compare, Hash, Equal >::cend ( ) const
inline

Returns an iterator to the end of this set.

◆ rbegin()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
reverse_iterator confluent::set< T, Compare, Hash, Equal >::rbegin ( ) const
inline

Returns a reverse iterator to the beginning of this set.

◆ rend()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
reverse_iterator confluent::set< T, Compare, Hash, Equal >::rend ( ) const
inline

Returns a reverse iterator to the end of this set.

◆ find()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
iterator confluent::set< T, Compare, Hash, Equal >::find ( const key_type &  key) const
inline

Finds an element with a given key.

Parameters
keykey to search for
Returns
an iterator to the found element or end of this set if not found

Complexity: O(log n) expected time.

◆ lower_bound()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
iterator confluent::set< T, Compare, Hash, Equal >::lower_bound ( const key_type &  key) const
inline

Returns an iterator to the first element not less than a given key.

Parameters
keykey to search for
Returns
an iterator to the first element not less than the given key.

Complexity: O(log n) expected time.

◆ upper_bound()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
iterator confluent::set< T, Compare, Hash, Equal >::upper_bound ( const key_type &  key) const
inline

Returns an iterator to the first element greater than a given key.

Parameters
keykey to search for
Returns
an iterator to the first element greater than the given key.

Complexity: O(log n) expected time.

◆ equal_range()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
std::pair<iterator, iterator> confluent::set< T, Compare, Hash, Equal >::equal_range ( const key_type &  key) const
inline

Returns range of elements matching a given key.

r = s.equal_range(key);

is equivalent to

r = { s.lower_bound(key), s.upper_bound(key)};

Complexity: O(log n) expected time.

◆ at_index()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
const value_type& confluent::set< T, Compare, Hash, Equal >::at_index ( size_t  k) const
inline

Finds an element at a given index.

Parameters
kthe index of the wanted element
Returns
a reference to the element at the given index

Complexity: O(log n) expected time.

◆ count()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::count ( const key_type &  key) const
inline

Returns the number of elements matching a given key

Parameters
keykey to search for
Returns
0 if an element was found, otherwise 1

Complexity: O(log n) expected time.

◆ includes()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
bool confluent::set< T, Compare, Hash, Equal >::includes ( const set< T, Compare, Hash, Equal > &  other) const
inline

Tests if this set includes the elements in another set.

Result is undefined if not both sets are using the same set_provider.

Parameters
otherset to test if its elements are included in this set
Returns
true if all elements are included, false otherwise

Let n be the size of this set. Let m be the size of the other. Let d be the size of the difference between this set and the other set.

Complexity: O(min(m * log(n/m), d * log(n/d))) expected time and memory.

Note: The operation will return directly if m > n.

◆ provider()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
const provider_ptr& confluent::set< T, Compare, Hash, Equal >::provider ( ) const
inline

Returns a shared pointer to the set_provider used by this set.

◆ empty()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
bool confluent::set< T, Compare, Hash, Equal >::empty ( ) const
inline

Tests if this set is empty.

Returns
true if this set contains no elements, false otherwise

Complexity: Constant in time.

◆ size()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::size ( ) const
inline

Returns the number of elements in this set.

Complexity: Constant in time.

◆ hash()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
size_t confluent::set< T, Compare, Hash, Equal >::hash ( ) const
inline

Returns the combined hash value of all elements in this set.

Complexity: Constant in time.

◆ operator==()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
bool confluent::set< T, Compare, Hash, Equal >::operator== ( const set< T, Compare, Hash, Equal > &  rhs) const
inline

Tests if this set contains the same elements as another set.

Result is undefined if not both sets are using the same set_provider.

Returns
: true if this set contains the same elements as the other set, false otherwise

Complexity: Constant in time.

◆ operator!=()

template<class T , class Compare = std::less<T>, class Hash = std::hash<T>, class Equal = std::equal_to<T>>
bool confluent::set< T, Compare, Hash, Equal >::operator!= ( const set< T, Compare, Hash, Equal > &  rhs) const
inline

Tests if this set does not contain the same elements as another set.

Result is undefined if not both sets are using the same set_provider.

Returns
: true if this set does not contain the same elements as the other set, false otherwise

Complexity: Constant in time.


The documentation for this class was generated from the following file: