CLUEstering
High-performance density-based weighted clustering library developed at CERN
|
The AssociationMap class is a data structure that maps keys to values. It associates integer keys with integer values in ono-to-many or many-to-many associations. More...
#include <AssociationMap.hpp>
Classes | |
struct | Extents |
Public Member Functions | |
AssociationMap ()=default | |
Construct an empty AssociationMap. | |
AssociationMap (size_type nelements, size_type nbins, const TDev &dev) | |
Construct an AssociationMap with a specific number of elements and bins. | |
template<concepts::queue TQueue> | |
AssociationMap (size_type nelements, size_type nbins, TQueue &queue) | |
Construct an AssociationMap with a specific number of elements and bins. | |
auto | size () const |
Return the number of bins in the map. | |
auto | extents () const |
Return the extents of the internal buffers. | |
iterator | begin () |
Return iterator to the beginning of the content buffer. | |
const_iterator | begin () const |
Return const iterator to the beginning of the content buffer. | |
const_iterator | cbegin () const |
Return const iterator to the beginning of the content buffer. | |
iterator | end () |
Return iterator to the end of the content buffer. | |
const_iterator | end () const |
Return const iterator to the end of the content buffer. | |
const_iterator | cend () const |
Return const iterator to the end of the content buffer. | |
iterator | find (key_type key) |
const_iterator | find (key_type key) const |
size_type | count (key_type key) const |
Count the number of elements with the given key. | |
bool | contains (key_type key) const |
Check if the map contains elements with a given key. | |
iterator | lower_bound (key_type key) |
Get the iterator to the first element with a given key. | |
const_iterator | lower_bound (key_type key) const |
Get the const iterator to the first element with a given key. | |
iterator | upper_bound (key_type key) |
Get the iterator to the first element with a key greater than the given key. | |
const_iterator | upper_bound (key_type key) const |
Get the const iterator to the first element with a key greater than the given key. | |
std::pair< iterator, iterator > | equal_range (key_type key) |
Get the range of elements with a given key. | |
std::pair< const_iterator, const_iterator > | equal_range (key_type key) const |
Get the const range of elements with a given key. | |
The AssociationMap class is a data structure that maps keys to values. It associates integer keys with integer values in ono-to-many or many-to-many associations.
TDev | The device type to use for the allocation. Defaults to clue::Device. |
clue::AssociationMap< TDev >::AssociationMap | ( | size_type | nelements, |
size_type | nbins, | ||
const TDev & | dev ) |
Construct an AssociationMap with a specific number of elements and bins.
nelements | The number of elements to allocate |
nbins | The number of bins to allocate |
dev | The device to use for the allocation |
clue::AssociationMap< TDev >::AssociationMap | ( | size_type | nelements, |
size_type | nbins, | ||
TQueue & | queue ) |
Construct an AssociationMap with a specific number of elements and bins.
nelements | The number of elements to allocate |
nbins | The number of bins to allocate |
queue | The queue to use for the allocation |
iterator clue::AssociationMap< TDev >::begin | ( | ) |
Return iterator to the beginning of the content buffer.
const_iterator clue::AssociationMap< TDev >::begin | ( | ) | const |
Return const iterator to the beginning of the content buffer.
const_iterator clue::AssociationMap< TDev >::cbegin | ( | ) | const |
Return const iterator to the beginning of the content buffer.
const_iterator clue::AssociationMap< TDev >::cend | ( | ) | const |
Return const iterator to the end of the content buffer.
bool clue::AssociationMap< TDev >::contains | ( | key_type | key | ) | const |
Check if the map contains elements with a given key.
key | The key to check |
size_type clue::AssociationMap< TDev >::count | ( | key_type | key | ) | const |
Count the number of elements with the given key.
key | The key to count |
iterator clue::AssociationMap< TDev >::end | ( | ) |
Return iterator to the end of the content buffer.
const_iterator clue::AssociationMap< TDev >::end | ( | ) | const |
Return const iterator to the end of the content buffer.
std::pair< iterator, iterator > clue::AssociationMap< TDev >::equal_range | ( | key_type | key | ) |
Get the range of elements with a given key.
key | The key to search for |
std::pair< const_iterator, const_iterator > clue::AssociationMap< TDev >::equal_range | ( | key_type | key | ) | const |
Get the const range of elements with a given key.
key | The key to search for |
auto clue::AssociationMap< TDev >::extents | ( | ) | const |
Return the extents of the internal buffers.
iterator clue::AssociationMap< TDev >::lower_bound | ( | key_type | key | ) |
Get the iterator to the first element with a given key.
key | The key to search for |
const_iterator clue::AssociationMap< TDev >::lower_bound | ( | key_type | key | ) | const |
Get the const iterator to the first element with a given key.
key | The key to search for |
auto clue::AssociationMap< TDev >::size | ( | ) | const |
Return the number of bins in the map.
iterator clue::AssociationMap< TDev >::upper_bound | ( | key_type | key | ) |
Get the iterator to the first element with a key greater than the given key.
key | The key to search for |
const_iterator clue::AssociationMap< TDev >::upper_bound | ( | key_type | key | ) | const |
Get the const iterator to the first element with a key greater than the given key.
key | The key to search for |