DGtal 1.3.0
|
#include <DGtal/kernel/UnorderedSetByBlock.h>
Data Structures | |
struct | const_iterator |
Read iterator on set elements. Model of ForwardIterator. More... | |
struct | iterator |
Read-write iterator on set elements. Model of ForwardIterator. More... | |
Public Types | |
typedef UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual > | Self |
typedef TSplitter | Splitter |
typedef Splitter::Word | Word |
typedef Splitter::Coordinate | Coordinate |
typedef std::unordered_map< Key, Word, Hash, KeyEqual, UnorderedMapAllocator > | Container |
The underlying container, an unordered_map. More... | |
typedef Key | key_type |
Key. More... | |
typedef Key | value_type |
Key. More... | |
typedef Container::size_type | size_type |
Unsigned integer type (usually std::size_t) More... | |
typedef Container::difference_type | difference_type |
Signed integer type (usually std::ptrdiff_t) More... | |
typedef Hash | hasher |
Hash. More... | |
typedef KeyEqual | key_equal |
KeyEqual. More... | |
typedef Container::allocator_type | allocator_type |
Allocator. More... | |
typedef Key & | reference |
Reference to value_type/Key. More... | |
typedef const Key & | const_reference |
Const reference to value_type/Key. More... | |
typedef Key * | pointer |
Pointer to value_type/Key. More... | |
typedef const Key * | const_pointer |
Const Pointer to value_type/Key. More... | |
Public Member Functions | |
Standard services (construction, initialization, assignment) | |
UnorderedSetByBlock (size_type bucket_count=23, const Splitter &splitter=Splitter(), const Hash &hash=Hash(), const key_equal &equal=key_equal(), const UnorderedMapAllocator &alloc=UnorderedMapAllocator()) | |
~UnorderedSetByBlock ()=default | |
Default destructor. More... | |
UnorderedSetByBlock (const Self &other) | |
UnorderedSetByBlock (Self &&other) | |
Self & | operator= (const Self &other) |
Self & | operator= (Self &&other) |
Iterator services | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
Capacity services | |
bool | empty () const noexcept |
size_type | size () const noexcept |
size_type | max_size () const noexcept |
size_type | blocks () const noexcept |
size_type | memory_usage () const noexcept |
size_type | memory_usage_unordered_set () const noexcept |
Modifier services | |
void | clear () noexcept |
Clears the container. More... | |
void | swap (Self &other) noexcept |
std::pair< iterator, bool > | insert (const value_type &value) |
Attempts to insert an element into the set. More... | |
template<typename InputIterator > | |
void | insert (InputIterator first, InputIterator last) |
Inserts a range of element into the set. More... | |
template<typename... _Args> | |
std::pair< iterator, bool > | emplace (_Args &&... __args) |
Attempts to build and insert an element into the set. More... | |
iterator | erase (const_iterator pos) noexcept |
iterator | erase (const_iterator first, const_iterator last) noexcept |
size_type | erase (const key_type &key) |
Lookup services | |
iterator | find (const Key &key) |
const_iterator | find (const Key &key) const |
size_type | count (const Key &key) const |
std::pair< iterator, iterator > | equal_range (const Key &key) |
std::pair< const_iterator, const_iterator > | equal_range (const Key &key) const |
Hash policy services | |
void | reserve (size_type block_count) |
Private Attributes | |
Splitter | my_splitter |
The splitter object. More... | |
Container | my_elements |
the unordered_set containing the elements More... | |
size_type | my_size |
the number of elements More... | |
Set services | |
bool | includes (const Self &other) const |
bool | internal_includes_by_map_iterator (const Self &other) const |
bool | internal_trace_includes_by_map_iterator (const Self &other) const |
bool | internal_includes_by_iterator (const Self &other) const |
bool | internal_trace_includes_by_iterator (const Self &other) const |
This data structure represents a set of elements that must be integral arrays (i.e. digital points). It is similar to an unordered_set, but much more compact in general. The container used is a unordered_map from point to a 32-bit word. The idea is to group consecutive elements/points along x axis by blocks of 32 bits. If any point in a block is present, the corresponding element is present in the unordered_map and bits set to 1 in the word correspond to points present in the set. On average, memory occupancy is divided by four, the structure is four times faster for traversal and approximately same speed for queries/insertion/erase.
Almost all standard operations of unordered_set in c++11 are implemented.
Key | the type of integral array. |
TSplitter | the type for splitting a key into a block and a bit (see Splitter). |
Hash | the type that provides a hasher for Key. |
KeyEqual | the type that provides an equality comparator for Key. |
UnorderedMapAllocator | the type that provides an allocator for the underlying unordered_map container. |
Specialized versions of Splitter are written for usual digital points of Z2i or Z3i.
Definition at line 163 of file UnorderedSetByBlock.h.
typedef Container::allocator_type DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::allocator_type |
Allocator.
Definition at line 186 of file UnorderedSetByBlock.h.
typedef const Key* DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::const_pointer |
Const Pointer to value_type/Key.
Definition at line 194 of file UnorderedSetByBlock.h.
typedef const Key& DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::const_reference |
Const reference to value_type/Key.
Definition at line 190 of file UnorderedSetByBlock.h.
typedef std::unordered_map< Key, Word, Hash, KeyEqual, UnorderedMapAllocator > DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::Container |
The underlying container, an unordered_map.
Definition at line 170 of file UnorderedSetByBlock.h.
typedef Splitter::Coordinate DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::Coordinate |
Definition at line 167 of file UnorderedSetByBlock.h.
typedef Container::difference_type DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::difference_type |
Signed integer type (usually std::ptrdiff_t)
Definition at line 180 of file UnorderedSetByBlock.h.
typedef Hash DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::hasher |
Hash.
Definition at line 182 of file UnorderedSetByBlock.h.
typedef KeyEqual DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::key_equal |
KeyEqual.
Definition at line 184 of file UnorderedSetByBlock.h.
typedef Key DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::key_type |
Key.
Definition at line 174 of file UnorderedSetByBlock.h.
typedef Key* DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::pointer |
Pointer to value_type/Key.
Definition at line 192 of file UnorderedSetByBlock.h.
typedef Key& DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::reference |
Reference to value_type/Key.
Definition at line 188 of file UnorderedSetByBlock.h.
typedef UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual > DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::Self |
Definition at line 164 of file UnorderedSetByBlock.h.
typedef Container::size_type DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::size_type |
Unsigned integer type (usually std::size_t)
Definition at line 178 of file UnorderedSetByBlock.h.
typedef TSplitter DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::Splitter |
Definition at line 165 of file UnorderedSetByBlock.h.
typedef Key DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::value_type |
Key.
Definition at line 176 of file UnorderedSetByBlock.h.
typedef Splitter::Word DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::Word |
Definition at line 166 of file UnorderedSetByBlock.h.
|
inline |
Main constructor.
bucket_count | the initial number of buckets for the underlying container. |
splitter | the splitter object for keys. |
hash | the hash object for keys. |
equal | the key equality comparator object for keys. |
alloc | the allocator for the underlying container. |
Definition at line 474 of file UnorderedSetByBlock.h.
|
default |
Default destructor.
|
inline |
Copy constructor
other | the object to clone |
Definition at line 488 of file UnorderedSetByBlock.h.
|
inline |
Move constructor
other | the object to clone |
Definition at line 496 of file UnorderedSetByBlock.h.
|
inline |
Definition at line 534 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
|
inline |
Definition at line 545 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
|
inlinenoexcept |
Definition at line 582 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::memory_usage().
|
inline |
Definition at line 556 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_includes_by_iterator(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_trace_includes_by_iterator().
|
inline |
Definition at line 561 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::erase(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_includes_by_iterator(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_trace_includes_by_iterator().
|
inlinenoexcept |
Clears the container.
Definition at line 620 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size.
|
inline |
key | the value to look-up. |
Definition at line 896 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_splitter.
|
inline |
Attempts to build and insert an element into the set.
__args | Arguments used to generate an element. |
This function attempts to build and insert an element into the set. A set relies on unique keys and thus an element is only inserted if it is not already present in the set.
Insertion takes amortized constant time.
Definition at line 714 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_splitter.
|
inlinenoexcept |
Definition at line 574 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
|
inline |
Definition at line 539 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::equal_range(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::erase(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find().
|
inline |
Definition at line 550 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
|
inline |
Returns the bounds of a range that includes all the elements that compare equal to k. In set containers, where keys are unique, the range will include one element at most.
key | the value to look-up. |
Definition at line 914 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::end(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find().
|
inline |
Returns the bounds of a range that includes all the elements that compare equal to k. In set containers, where keys are unique, the range will include one element at most.
key | the value to look-up. |
Definition at line 934 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::end(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find().
|
inline |
Removes specified element from the container, if it exists.
key | the value to erase from the set |
Definition at line 844 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::end(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::erase(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find().
|
inlinenoexcept |
Removes the elements in the range [first; last), which must be a valid range in *this.
first | an iterator such that [first; last) is a valid range in this data structure |
last | an iterator such that [first; last) is a valid range in this data structure |
Definition at line 779 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cend(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::end(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size, and DGtal::Bits::nbSetBits().
|
inlinenoexcept |
Removes specified element from the container.
pos | a valid iterator in this data structure |
Definition at line 749 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cend(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::erase().
|
inline |
Finds an element with key equivalent to key.
key | the value to look-up. |
end()
if the key is not the set. Definition at line 867 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::end(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_splitter.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::equal_range(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::erase(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_includes_by_iterator(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_trace_includes_by_iterator().
|
inline |
Finds an element with key equivalent to key.
key | the value to look-up. |
end()
if the key is not the set. Definition at line 882 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cend(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_splitter.
|
inline |
other | any unordered set with same sort of elements |
Definition at line 958 of file UnorderedSetByBlock.h.
|
inline |
Attempts to insert an element into the set.
value | Element to be inserted. |
This function attempts to insert an element into the set. A set relies on unique keys and thus an element is only inserted if it is not already present in the set.
Insertion requires amortized constant time.
Definition at line 656 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_splitter.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::insert().
|
inline |
Inserts a range of element into the set.
InputIterator | any model of input iterator |
[in] | first | an iterator pointing on the first element of the range |
[in] | last | an iterator pointing after the last element of the range |
This function inserts a range of elements into the set. A set relies on unique keys and thus an element is only inserted if it is not already present in the set.
Each insertion requires amortized constant time.
Definition at line 694 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::insert().
|
inlineprotected |
Performs includes operation using iterators and big steps, slightly slower than internal_includes_by_map_iterator.
other | any unordered set with same sort of elements |
Definition at line 1019 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cbegin(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cend(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find().
|
inlineprotected |
Performs includes operation using underlying container iterator.
other | any unordered set with same sort of elements |
Definition at line 968 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::includes().
|
inlineprotected |
Performs includes operation using iterators and big steps, slightly slower than internal_includes_by_map_iterator. Verbose version for debug.
other | any unordered set with same sort of elements |
Definition at line 1043 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cbegin(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cend(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find(), DGtal::Trace::info(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::size(), and DGtal::trace.
|
inlineprotected |
Performs includes operation using underlying container iterator. Verbose version for debug.
other | any unordered set with same sort of elements |
Definition at line 989 of file UnorderedSetByBlock.h.
References DGtal::Trace::info(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::size(), and DGtal::trace.
|
inlinenoexcept |
Definition at line 578 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
|
inlinenoexcept |
Definition at line 586 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::blocks(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
|
inlinenoexcept |
Definition at line 601 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::size().
|
inline |
Assignment
other | the object to clone |
Definition at line 505 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_splitter.
|
inline |
Default move assignment
other | the object to clone |
Definition at line 518 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_splitter.
|
inline |
Sets the number of buckets to the number needed to accomodate at least count elements without exceeding maximum load factor and rehashes the container, i.e. puts the elements into appropriate buckets considering that total number of buckets has changed. Effectively calls rehash(std::ceil(count / max_load_factor()))
.
block_count | new capacity of the container (should be thought in terms of number of expected blocks). |
Definition at line 1087 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements.
|
inlinenoexcept |
Definition at line 576 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_trace_includes_by_iterator(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_trace_includes_by_map_iterator(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::memory_usage_unordered_set().
|
inlinenoexcept |
Exchanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements.
other | the other set to exchange with. |
Definition at line 636 of file UnorderedSetByBlock.h.
References DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_elements, DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_size, and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::my_splitter.
|
private |
the unordered_set containing the elements
Definition at line 1099 of file UnorderedSetByBlock.h.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::begin(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::blocks(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cbegin(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::cend(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::clear(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::const_iterator::const_iterator(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::count(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::emplace(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::empty(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::end(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::erase(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::const_iterator::increment(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::iterator::increment(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::insert(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_includes_by_map_iterator(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::internal_trace_includes_by_map_iterator(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::iterator::iterator(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::max_size(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::memory_usage(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::memory_usage_unordered_set(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::operator=(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::reserve(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::swap().
|
private |
the number of elements
Definition at line 1101 of file UnorderedSetByBlock.h.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::clear(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::emplace(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::erase(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::insert(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::operator=(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::size(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::swap().
|
private |
The splitter object.
Definition at line 1097 of file UnorderedSetByBlock.h.
Referenced by DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::const_iterator::const_iterator(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::count(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::const_iterator::dereference(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::iterator::dereference(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::emplace(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::find(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::insert(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::iterator::iterator(), DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::operator=(), and DGtal::UnorderedSetByBlock< Key, TSplitter, Hash, KeyEqual, UnorderedMapAllocator >::swap().