robin_map.h
Go to the documentation of this file.
1 
24 #ifndef TSL_ROBIN_MAP_H
25 #define TSL_ROBIN_MAP_H
26 
27 #include <cstddef>
28 #include <functional>
29 #include <initializer_list>
30 #include <memory>
31 #include <type_traits>
32 #include <utility>
33 
34 #include "robin_hash.h"
35 
36 namespace tsl {
37 
86 template <class Key, class T, class Hash = std::hash<Key>,
87  class KeyEqual = std::equal_to<Key>,
88  class Allocator = std::allocator<std::pair<Key, T>>,
89  bool StoreHash = false,
90  class GrowthPolicy = tsl::rh::power_of_two_growth_policy<2>>
91 class robin_map {
92  private:
93  template <typename U>
95 
96  class KeySelect {
97  public:
98  using key_type = Key;
99 
101  const std::pair<Key, T>& key_value) const noexcept {
102  return key_value.first;
103  }
104 
105  key_type& operator()(std::pair<Key, T>& key_value) noexcept {
106  return key_value.first;
107  }
108  };
109 
110  class ValueSelect {
111  public:
112  using value_type = T;
113 
115  const std::pair<Key, T>& key_value) const noexcept {
116  return key_value.second;
117  }
118 
119  value_type& operator()(std::pair<Key, T>& key_value) noexcept {
120  return key_value.second;
121  }
122  };
123 
125  ValueSelect, Hash, KeyEqual,
126  Allocator, StoreHash, GrowthPolicy>;
127 
128  public:
129  using key_type = typename ht::key_type;
130  using mapped_type = T;
131  using value_type = typename ht::value_type;
132  using size_type = typename ht::size_type;
134  using hasher = typename ht::hasher;
135  using key_equal = typename ht::key_equal;
137  using reference = typename ht::reference;
139  using pointer = typename ht::pointer;
141  using iterator = typename ht::iterator;
143 
144  public:
145  /*
146  * Constructors
147  */
148  robin_map() : robin_map(ht::DEFAULT_INIT_BUCKETS_SIZE) {}
149 
150  explicit robin_map(size_type bucket_count, const Hash& hash = Hash(),
151  const KeyEqual& equal = KeyEqual(),
152  const Allocator& alloc = Allocator())
153  : m_ht(bucket_count, hash, equal, alloc) {}
154 
155  robin_map(size_type bucket_count, const Allocator& alloc)
156  : robin_map(bucket_count, Hash(), KeyEqual(), alloc) {}
157 
158  robin_map(size_type bucket_count, const Hash& hash, const Allocator& alloc)
159  : robin_map(bucket_count, hash, KeyEqual(), alloc) {}
160 
161  explicit robin_map(const Allocator& alloc)
162  : robin_map(ht::DEFAULT_INIT_BUCKETS_SIZE, alloc) {}
163 
164  template <class InputIt>
165  robin_map(InputIt first, InputIt last,
167  const Hash& hash = Hash(), const KeyEqual& equal = KeyEqual(),
168  const Allocator& alloc = Allocator())
169  : robin_map(bucket_count, hash, equal, alloc) {
170  insert(first, last);
171  }
172 
173  template <class InputIt>
174  robin_map(InputIt first, InputIt last, size_type bucket_count,
175  const Allocator& alloc)
176  : robin_map(first, last, bucket_count, Hash(), KeyEqual(), alloc) {}
177 
178  template <class InputIt>
179  robin_map(InputIt first, InputIt last, size_type bucket_count,
180  const Hash& hash, const Allocator& alloc)
181  : robin_map(first, last, bucket_count, hash, KeyEqual(), alloc) {}
182 
183  robin_map(std::initializer_list<value_type> init,
185  const Hash& hash = Hash(), const KeyEqual& equal = KeyEqual(),
186  const Allocator& alloc = Allocator())
187  : robin_map(init.begin(), init.end(), bucket_count, hash, equal, alloc) {}
188 
189  robin_map(std::initializer_list<value_type> init, size_type bucket_count,
190  const Allocator& alloc)
191  : robin_map(init.begin(), init.end(), bucket_count, Hash(), KeyEqual(),
192  alloc) {}
193 
194  robin_map(std::initializer_list<value_type> init, size_type bucket_count,
195  const Hash& hash, const Allocator& alloc)
196  : robin_map(init.begin(), init.end(), bucket_count, hash, KeyEqual(),
197  alloc) {}
198 
199  robin_map& operator=(std::initializer_list<value_type> ilist) {
200  m_ht.clear();
201 
202  m_ht.reserve(ilist.size());
203  m_ht.insert(ilist.begin(), ilist.end());
204 
205  return *this;
206  }
207 
209 
210  /*
211  * Iterators
212  */
213  iterator begin() noexcept { return m_ht.begin(); }
214  const_iterator begin() const noexcept { return m_ht.begin(); }
215  const_iterator cbegin() const noexcept { return m_ht.cbegin(); }
216 
217  iterator end() noexcept { return m_ht.end(); }
218  const_iterator end() const noexcept { return m_ht.end(); }
219  const_iterator cend() const noexcept { return m_ht.cend(); }
220 
221  /*
222  * Capacity
223  */
224  bool empty() const noexcept { return m_ht.empty(); }
225  size_type size() const noexcept { return m_ht.size(); }
226  size_type max_size() const noexcept { return m_ht.max_size(); }
227 
228  /*
229  * Modifiers
230  */
231  void clear() noexcept { m_ht.clear(); }
232 
233  std::pair<iterator, bool> insert(const value_type& value) {
234  return m_ht.insert(value);
235  }
236 
237  template <class P, typename std::enable_if<std::is_constructible<
238  value_type, P&&>::value>::type* = nullptr>
239  std::pair<iterator, bool> insert(P&& value) {
240  return m_ht.emplace(std::forward<P>(value));
241  }
242 
243  std::pair<iterator, bool> insert(value_type&& value) {
244  return m_ht.insert(std::move(value));
245  }
246 
247  iterator insert(const_iterator hint, const value_type& value) {
248  return m_ht.insert_hint(hint, value);
249  }
250 
251  template <class P, typename std::enable_if<std::is_constructible<
252  value_type, P&&>::value>::type* = nullptr>
253  iterator insert(const_iterator hint, P&& value) {
254  return m_ht.emplace_hint(hint, std::forward<P>(value));
255  }
256 
258  return m_ht.insert_hint(hint, std::move(value));
259  }
260 
261  template <class InputIt>
262  void insert(InputIt first, InputIt last) {
263  m_ht.insert(first, last);
264  }
265 
266  void insert(std::initializer_list<value_type> ilist) {
267  m_ht.insert(ilist.begin(), ilist.end());
268  }
269 
270  template <class M>
271  std::pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj) {
272  return m_ht.insert_or_assign(k, std::forward<M>(obj));
273  }
274 
275  template <class M>
276  std::pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj) {
277  return m_ht.insert_or_assign(std::move(k), std::forward<M>(obj));
278  }
279 
280  template <class M>
282  return m_ht.insert_or_assign(hint, k, std::forward<M>(obj));
283  }
284 
285  template <class M>
287  return m_ht.insert_or_assign(hint, std::move(k), std::forward<M>(obj));
288  }
289 
297  template <class... Args>
298  std::pair<iterator, bool> emplace(Args&&... args) {
299  return m_ht.emplace(std::forward<Args>(args)...);
300  }
301 
309  template <class... Args>
310  iterator emplace_hint(const_iterator hint, Args&&... args) {
311  return m_ht.emplace_hint(hint, std::forward<Args>(args)...);
312  }
313 
314  template <class... Args>
315  std::pair<iterator, bool> try_emplace(const key_type& k, Args&&... args) {
316  return m_ht.try_emplace(k, std::forward<Args>(args)...);
317  }
318 
319  template <class... Args>
320  std::pair<iterator, bool> try_emplace(key_type&& k, Args&&... args) {
321  return m_ht.try_emplace(std::move(k), std::forward<Args>(args)...);
322  }
323 
324  template <class... Args>
325  iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args) {
326  return m_ht.try_emplace_hint(hint, k, std::forward<Args>(args)...);
327  }
328 
329  template <class... Args>
330  iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args) {
331  return m_ht.try_emplace_hint(hint, std::move(k),
332  std::forward<Args>(args)...);
333  }
334 
335  iterator erase(iterator pos) { return m_ht.erase(pos); }
336  iterator erase(const_iterator pos) { return m_ht.erase(pos); }
338  return m_ht.erase(first, last);
339  }
340  size_type erase(const key_type& key) { return m_ht.erase(key); }
341 
348  void erase_fast(iterator pos) { return m_ht.erase_fast(pos); }
349 
355  size_type erase(const key_type& key, std::size_t precalculated_hash) {
356  return m_ht.erase(key, precalculated_hash);
357  }
358 
364  template <
365  class K, class KE = KeyEqual,
366  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
367  size_type erase(const K& key) {
368  return m_ht.erase(key);
369  }
370 
378  template <
379  class K, class KE = KeyEqual,
380  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
381  size_type erase(const K& key, std::size_t precalculated_hash) {
382  return m_ht.erase(key, precalculated_hash);
383  }
384 
385  void swap(robin_map& other) { other.m_ht.swap(m_ht); }
386 
387  /*
388  * Lookup
389  */
390  T& at(const Key& key) { return m_ht.at(key); }
391 
397  T& at(const Key& key, std::size_t precalculated_hash) {
398  return m_ht.at(key, precalculated_hash);
399  }
400 
401  const T& at(const Key& key) const { return m_ht.at(key); }
402 
406  const T& at(const Key& key, std::size_t precalculated_hash) const {
407  return m_ht.at(key, precalculated_hash);
408  }
409 
415  template <
416  class K, class KE = KeyEqual,
417  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
418  T& at(const K& key) {
419  return m_ht.at(key);
420  }
421 
429  template <
430  class K, class KE = KeyEqual,
431  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
432  T& at(const K& key, std::size_t precalculated_hash) {
433  return m_ht.at(key, precalculated_hash);
434  }
435 
439  template <
440  class K, class KE = KeyEqual,
441  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
442  const T& at(const K& key) const {
443  return m_ht.at(key);
444  }
445 
449  template <
450  class K, class KE = KeyEqual,
451  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
452  const T& at(const K& key, std::size_t precalculated_hash) const {
453  return m_ht.at(key, precalculated_hash);
454  }
455 
456  T& operator[](const Key& key) { return m_ht[key]; }
457  T& operator[](Key&& key) { return m_ht[std::move(key)]; }
458 
459  size_type count(const Key& key) const { return m_ht.count(key); }
460 
466  size_type count(const Key& key, std::size_t precalculated_hash) const {
467  return m_ht.count(key, precalculated_hash);
468  }
469 
475  template <
476  class K, class KE = KeyEqual,
477  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
478  size_type count(const K& key) const {
479  return m_ht.count(key);
480  }
481 
489  template <
490  class K, class KE = KeyEqual,
491  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
492  size_type count(const K& key, std::size_t precalculated_hash) const {
493  return m_ht.count(key, precalculated_hash);
494  }
495 
496  iterator find(const Key& key) { return m_ht.find(key); }
497 
503  iterator find(const Key& key, std::size_t precalculated_hash) {
504  return m_ht.find(key, precalculated_hash);
505  }
506 
507  const_iterator find(const Key& key) const { return m_ht.find(key); }
508 
512  const_iterator find(const Key& key, std::size_t precalculated_hash) const {
513  return m_ht.find(key, precalculated_hash);
514  }
515 
521  template <
522  class K, class KE = KeyEqual,
523  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
524  iterator find(const K& key) {
525  return m_ht.find(key);
526  }
527 
535  template <
536  class K, class KE = KeyEqual,
537  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
538  iterator find(const K& key, std::size_t precalculated_hash) {
539  return m_ht.find(key, precalculated_hash);
540  }
541 
545  template <
546  class K, class KE = KeyEqual,
547  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
548  const_iterator find(const K& key) const {
549  return m_ht.find(key);
550  }
551 
559  template <
560  class K, class KE = KeyEqual,
561  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
562  const_iterator find(const K& key, std::size_t precalculated_hash) const {
563  return m_ht.find(key, precalculated_hash);
564  }
565 
566  bool contains(const Key& key) const { return m_ht.contains(key); }
567 
573  bool contains(const Key& key, std::size_t precalculated_hash) const {
574  return m_ht.contains(key, precalculated_hash);
575  }
576 
582  template <
583  class K, class KE = KeyEqual,
584  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
585  bool contains(const K& key) const {
586  return m_ht.contains(key);
587  }
588 
596  template <
597  class K, class KE = KeyEqual,
598  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
599  bool contains(const K& key, std::size_t precalculated_hash) const {
600  return m_ht.contains(key, precalculated_hash);
601  }
602 
603  std::pair<iterator, iterator> equal_range(const Key& key) {
604  return m_ht.equal_range(key);
605  }
606 
612  std::pair<iterator, iterator> equal_range(const Key& key,
613  std::size_t precalculated_hash) {
614  return m_ht.equal_range(key, precalculated_hash);
615  }
616 
617  std::pair<const_iterator, const_iterator> equal_range(const Key& key) const {
618  return m_ht.equal_range(key);
619  }
620 
624  std::pair<const_iterator, const_iterator> equal_range(
625  const Key& key, std::size_t precalculated_hash) const {
626  return m_ht.equal_range(key, precalculated_hash);
627  }
628 
634  template <
635  class K, class KE = KeyEqual,
636  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
637  std::pair<iterator, iterator> equal_range(const K& key) {
638  return m_ht.equal_range(key);
639  }
640 
648  template <
649  class K, class KE = KeyEqual,
650  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
651  std::pair<iterator, iterator> equal_range(const K& key,
652  std::size_t precalculated_hash) {
653  return m_ht.equal_range(key, precalculated_hash);
654  }
655 
659  template <
660  class K, class KE = KeyEqual,
661  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
662  std::pair<const_iterator, const_iterator> equal_range(const K& key) const {
663  return m_ht.equal_range(key);
664  }
665 
669  template <
670  class K, class KE = KeyEqual,
671  typename std::enable_if<has_is_transparent<KE>::value>::type* = nullptr>
672  std::pair<const_iterator, const_iterator> equal_range(
673  const K& key, std::size_t precalculated_hash) const {
674  return m_ht.equal_range(key, precalculated_hash);
675  }
676 
677  /*
678  * Bucket interface
679  */
680  size_type bucket_count() const { return m_ht.bucket_count(); }
682 
683  /*
684  * Hash policy
685  */
686  float load_factor() const { return m_ht.load_factor(); }
687 
688  float min_load_factor() const { return m_ht.min_load_factor(); }
689  float max_load_factor() const { return m_ht.max_load_factor(); }
690 
700  void min_load_factor(float ml) { m_ht.min_load_factor(ml); }
701  void max_load_factor(float ml) { m_ht.max_load_factor(ml); }
702 
703  void rehash(size_type count_) { m_ht.rehash(count_); }
704  void reserve(size_type count_) { m_ht.reserve(count_); }
705 
706  /*
707  * Observers
708  */
709  hasher hash_function() const { return m_ht.hash_function(); }
710  key_equal key_eq() const { return m_ht.key_eq(); }
711 
712  /*
713  * Other
714  */
715 
720  return m_ht.mutable_iterator(pos);
721  }
722 
736  template <class Serializer>
737  void serialize(Serializer& serializer) const {
739  }
740 
767  template <class Deserializer>
768  static robin_map deserialize(Deserializer& deserializer,
769  bool hash_compatible = false) {
770  robin_map map(0);
771  map.m_ht.deserialize(deserializer, hash_compatible);
772 
773  return map;
774  }
775 
776  friend bool operator==(const robin_map& lhs, const robin_map& rhs) {
777  if (lhs.size() != rhs.size()) {
778  return false;
779  }
780 
781  for (const auto& element_lhs : lhs) {
782  const auto it_element_rhs = rhs.find(element_lhs.first);
783  if (it_element_rhs == rhs.cend() ||
784  element_lhs.second != it_element_rhs->second) {
785  return false;
786  }
787  }
788 
789  return true;
790  }
791 
792  friend bool operator!=(const robin_map& lhs, const robin_map& rhs) {
793  return !operator==(lhs, rhs);
794  }
795 
796  friend void swap(robin_map& lhs, robin_map& rhs) { lhs.swap(rhs); }
797 
798  private:
800 };
801 
806 template <class Key, class T, class Hash = std::hash<Key>,
807  class KeyEqual = std::equal_to<Key>,
808  class Allocator = std::allocator<std::pair<Key, T>>,
809  bool StoreHash = false>
810 using robin_pg_map = robin_map<Key, T, Hash, KeyEqual, Allocator, StoreHash,
812 
813 } // end namespace tsl
814 
815 #endif
tsl::robin_map::mutable_iterator
iterator mutable_iterator(const_iterator pos)
Definition: robin_map.h:719
tsl::robin_map::min_load_factor
float min_load_factor() const
Definition: robin_map.h:688
tsl::robin_map::contains
bool contains(const Key &key, std::size_t precalculated_hash) const
Definition: robin_map.h:573
tsl::rh::prime_growth_policy
Definition: robin_growth_policy.h:369
tsl
Definition: robin_growth_policy.h:84
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::const_reference
typename ht::const_reference const_reference
Definition: robin_map.h:138
tsl::robin_map::emplace
std::pair< iterator, bool > emplace(Args &&... args)
Definition: robin_map.h:298
tsl::robin_map::serialize
void serialize(Serializer &serializer) const
Definition: robin_map.h:737
tsl::robin_map::find
iterator find(const K &key, std::size_t precalculated_hash)
Definition: robin_map.h:538
tsl::detail_robin_hash::robin_hash::erase_fast
void erase_fast(iterator pos)
Definition: robin_hash.h:823
tsl::detail_robin_hash::robin_hash::contains
bool contains(const K &key) const
Definition: robin_hash.h:1018
tsl::detail_robin_hash::robin_hash::const_pointer
const value_type * const_pointer
Definition: robin_hash.h:388
tsl::detail_robin_hash::robin_hash::reserve
void reserve(size_type count_)
Definition: robin_hash.h:1093
tsl::robin_map::at
const T & at(const K &key, std::size_t precalculated_hash) const
Definition: robin_map.h:452
tsl::robin_map::equal_range
std::pair< const_iterator, const_iterator > equal_range(const Key &key) const
Definition: robin_map.h:617
tsl::detail_robin_hash::robin_hash::hash_function
hasher hash_function() const
Definition: robin_hash.h:1100
tsl::detail_robin_hash::robin_hash::size
size_type size() const noexcept
Definition: robin_hash.h:720
tsl::robin_map::ValueSelect
Definition: robin_map.h:110
tsl::detail_robin_hash::robin_hash::max_load_factor
float max_load_factor() const
Definition: robin_hash.h:1073
tsl::robin_map::insert
std::pair< iterator, bool > insert(P &&value)
Definition: robin_map.h:239
tsl::robin_map::robin_map
robin_map(size_type bucket_count, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator())
Definition: robin_map.h:150
tsl::robin_map::operator[]
T & operator[](const Key &key)
Definition: robin_map.h:456
tsl::robin_map::max_bucket_count
size_type max_bucket_count() const
Definition: robin_map.h:681
tsl::robin_map::find
iterator find(const Key &key, std::size_t precalculated_hash)
Definition: robin_map.h:503
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::key_equal
typename ht::key_equal key_equal
Definition: robin_map.h:135
tsl::detail_robin_hash::robin_hash::emplace
std::pair< iterator, bool > emplace(Args &&... args)
Definition: robin_hash.h:798
tsl::robin_map::at
const T & at(const K &key) const
Definition: robin_map.h:442
tsl::robin_map::end
iterator end() noexcept
Definition: robin_map.h:217
tsl::robin_map::hash_function
hasher hash_function() const
Definition: robin_map.h:709
tsl::robin_map::erase
iterator erase(const_iterator first, const_iterator last)
Definition: robin_map.h:337
tsl::detail_robin_hash::robin_hash::difference_type
std::ptrdiff_t difference_type
Definition: robin_hash.h:381
tsl::robin_map::equal_range
std::pair< iterator, iterator > equal_range(const Key &key, std::size_t precalculated_hash)
Definition: robin_map.h:612
tsl::robin_map::begin
iterator begin() noexcept
Definition: robin_map.h:213
tsl::robin_map::at
T & at(const K &key)
Definition: robin_map.h:418
tsl::robin_map::swap
void swap(robin_map &other)
Definition: robin_map.h:385
tsl::robin_map::ValueSelect::operator()
value_type & operator()(std::pair< Key, T > &key_value) noexcept
Definition: robin_map.h:119
tsl::robin_map::end
const_iterator end() const noexcept
Definition: robin_map.h:218
tsl::detail_robin_hash::robin_hash::empty
bool empty() const noexcept
Definition: robin_hash.h:718
tsl::detail_robin_hash::robin_hash::size_type
std::size_t size_type
Definition: robin_hash.h:380
P
PointMatcherSupport::Parametrizable P
Definition: PointToPlane.cpp:48
tsl::robin_map::contains
bool contains(const Key &key) const
Definition: robin_map.h:566
tsl::robin_map::insert
iterator insert(const_iterator hint, value_type &&value)
Definition: robin_map.h:257
tsl::robin_map::erase
size_type erase(const K &key, std::size_t precalculated_hash)
Definition: robin_map.h:381
tsl::detail_robin_hash::robin_hash::serialize
void serialize(Serializer &serializer) const
Definition: robin_hash.h:1112
tsl::robin_map::operator!=
friend bool operator!=(const robin_map &lhs, const robin_map &rhs)
Definition: robin_map.h:792
tsl::robin_map::count
size_type count(const K &key) const
Definition: robin_map.h:478
tsl::robin_map::find
const_iterator find(const Key &key) const
Definition: robin_map.h:507
tsl::robin_map::insert
void insert(InputIt first, InputIt last)
Definition: robin_map.h:262
tsl::robin_map::insert
std::pair< iterator, bool > insert(const value_type &value)
Definition: robin_map.h:233
tsl::robin_map::find
const_iterator find(const K &key, std::size_t precalculated_hash) const
Definition: robin_map.h:562
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::key_type
typename ht::key_type key_type
Definition: robin_map.h:129
tsl::robin_map::begin
const_iterator begin() const noexcept
Definition: robin_map.h:214
tsl::detail_robin_hash::robin_hash::pointer
value_type * pointer
Definition: robin_hash.h:387
tsl::robin_map::max_load_factor
void max_load_factor(float ml)
Definition: robin_map.h:701
tsl::robin_map::contains
bool contains(const K &key) const
Definition: robin_map.h:585
serializer
Definition: robin-map/tests/utils.h:349
tsl::robin_map::operator[]
T & operator[](Key &&key)
Definition: robin_map.h:457
tsl::robin_map::contains
bool contains(const K &key, std::size_t precalculated_hash) const
Definition: robin_map.h:599
tsl::robin_map::at
const T & at(const Key &key, std::size_t precalculated_hash) const
Definition: robin_map.h:406
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::hasher
typename ht::hasher hasher
Definition: robin_map.h:134
tsl::robin_map::insert_or_assign
std::pair< iterator, bool > insert_or_assign(const key_type &k, M &&obj)
Definition: robin_map.h:271
tsl::detail_robin_hash::robin_hash::at
U::value_type & at(const K &key)
Definition: robin_hash.h:949
tsl::detail_robin_hash::robin_hash::max_size
size_type max_size() const noexcept
Definition: robin_hash.h:722
tsl::robin_map::bucket_count
size_type bucket_count() const
Definition: robin_map.h:680
tsl::robin_map::empty
bool empty() const noexcept
Definition: robin_map.h:224
tsl::detail_robin_hash::robin_hash::insert_hint
iterator insert_hint(const_iterator hint, P &&value)
Definition: robin_hash.h:746
tsl::robin_map::operator=
robin_map & operator=(std::initializer_list< value_type > ilist)
Definition: robin_map.h:199
tsl::robin_map::equal_range
std::pair< iterator, iterator > equal_range(const Key &key)
Definition: robin_map.h:603
tsl::robin_map::ValueSelect::value_type
T value_type
Definition: robin_map.h:112
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::allocator_type
typename ht::allocator_type allocator_type
Definition: robin_map.h:136
tsl::detail_robin_hash::robin_hash::clear
void clear() noexcept
Definition: robin_hash.h:727
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::const_pointer
typename ht::const_pointer const_pointer
Definition: robin_map.h:140
tsl::robin_map::max_size
size_type max_size() const noexcept
Definition: robin_map.h:226
tsl::robin_map::robin_map
robin_map(size_type bucket_count, const Allocator &alloc)
Definition: robin_map.h:155
tsl::robin_map::robin_map
robin_map()
Definition: robin_map.h:148
tsl::robin_map::try_emplace
iterator try_emplace(const_iterator hint, const key_type &k, Args &&... args)
Definition: robin_map.h:325
tsl::robin_map::erase
size_type erase(const K &key)
Definition: robin_map.h:367
mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t
Definition: PointCloudToVoxelGridSingle.h:44
robin_hash.h
tsl::detail_robin_hash::robin_hash::value_type
ValueType value_type
Definition: robin_hash.h:379
tsl::detail_robin_hash::robin_hash::find
iterator find(const K &key)
Definition: robin_hash.h:998
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::value_type
typename ht::value_type value_type
Definition: robin_map.h:131
tsl::robin_map::count
size_type count(const K &key, std::size_t precalculated_hash) const
Definition: robin_map.h:492
tsl::robin_map::try_emplace
std::pair< iterator, bool > try_emplace(const key_type &k, Args &&... args)
Definition: robin_map.h:315
tsl::robin_map::insert_or_assign
iterator insert_or_assign(const_iterator hint, const key_type &k, M &&obj)
Definition: robin_map.h:281
tsl::detail_robin_hash::robin_hash::cbegin
const_iterator cbegin() const noexcept
Definition: robin_hash.h:698
tsl::robin_map::key_eq
key_equal key_eq() const
Definition: robin_map.h:710
tsl::detail_robin_hash::robin_hash::rehash
void rehash(size_type count_)
Definition: robin_hash.h:1087
tsl::robin_map::min_load_factor
void min_load_factor(float ml)
Definition: robin_map.h:700
tsl::robin_map::robin_map
robin_map(std::initializer_list< value_type > init, size_type bucket_count, const Allocator &alloc)
Definition: robin_map.h:189
tsl::detail_robin_hash::robin_hash::count
size_type count(const K &key) const
Definition: robin_hash.h:984
tsl::robin_map::at
const T & at(const Key &key) const
Definition: robin_map.h:401
tsl::detail_robin_hash::has_is_transparent
Definition: robin_hash.h:55
tsl::robin_map::equal_range
std::pair< const_iterator, const_iterator > equal_range(const Key &key, std::size_t precalculated_hash) const
Definition: robin_map.h:624
tsl::detail_robin_hash::robin_hash::DEFAULT_INIT_BUCKETS_SIZE
static const size_type DEFAULT_INIT_BUCKETS_SIZE
Definition: robin_hash.h:1566
tsl::detail_robin_hash::robin_hash::cend
const_iterator cend() const noexcept
Definition: robin_hash.h:711
tsl::detail_robin_hash::robin_hash::key_equal
KeyEqual key_equal
Definition: robin_hash.h:383
tsl::robin_map::try_emplace
std::pair< iterator, bool > try_emplace(key_type &&k, Args &&... args)
Definition: robin_map.h:320
tsl::detail_robin_hash::robin_hash::reference
value_type & reference
Definition: robin_hash.h:385
tsl::detail_robin_hash::robin_hash::hasher
Hash hasher
Definition: robin_hash.h:382
tsl::robin_map::at
T & at(const Key &key, std::size_t precalculated_hash)
Definition: robin_map.h:397
tsl::robin_map::insert
iterator insert(const_iterator hint, P &&value)
Definition: robin_map.h:253
tsl::detail_robin_hash::robin_hash::erase
iterator erase(iterator pos)
Definition: robin_hash.h:831
tsl::robin_map::m_ht
ht m_ht
Definition: robin_map.h:799
tsl::robin_map::at
T & at(const Key &key)
Definition: robin_map.h:390
tsl::robin_map::find
iterator find(const Key &key)
Definition: robin_map.h:496
tsl::detail_robin_hash::robin_hash
Definition: robin_hash.h:362
tsl::robin_map::equal_range
std::pair< iterator, iterator > equal_range(const K &key, std::size_t precalculated_hash)
Definition: robin_map.h:651
tsl::robin_map::load_factor
float load_factor() const
Definition: robin_map.h:686
tsl::detail_robin_hash::robin_hash::mutable_iterator
iterator mutable_iterator(const_iterator pos)
Definition: robin_hash.h:1107
tsl::robin_map::erase
iterator erase(const_iterator pos)
Definition: robin_map.h:336
tsl::robin_map::equal_range
std::pair< const_iterator, const_iterator > equal_range(const K &key) const
Definition: robin_map.h:662
tsl::robin_map::robin_map
robin_map(InputIt first, InputIt last, size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: robin_map.h:179
tsl::robin_map::find
const_iterator find(const K &key) const
Definition: robin_map.h:548
tsl::robin_map::find
iterator find(const K &key)
Definition: robin_map.h:524
tsl::robin_map::insert_or_assign
std::pair< iterator, bool > insert_or_assign(key_type &&k, M &&obj)
Definition: robin_map.h:276
tsl::robin_map::find
const_iterator find(const Key &key, std::size_t precalculated_hash) const
Definition: robin_map.h:512
tsl::detail_robin_hash::robin_hash::emplace_hint
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition: robin_hash.h:803
tsl::robin_map::robin_map
robin_map(InputIt first, InputIt last, size_type bucket_count=ht::DEFAULT_INIT_BUCKETS_SIZE, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator())
Definition: robin_map.h:165
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::pointer
typename ht::pointer pointer
Definition: robin_map.h:139
tsl::detail_robin_hash::robin_hash::insert_or_assign
std::pair< iterator, bool > insert_or_assign(K &&key, M &&obj)
Definition: robin_hash.h:776
tsl::robin_map::get_allocator
allocator_type get_allocator() const
Definition: robin_map.h:208
tsl::detail_robin_hash::robin_hash::const_iterator
robin_iterator< true > const_iterator
Definition: robin_hash.h:390
tsl::robin_map::robin_map
robin_map(std::initializer_list< value_type > init, size_type bucket_count=ht::DEFAULT_INIT_BUCKETS_SIZE, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator())
Definition: robin_map.h:183
tsl::detail_robin_hash::robin_hash::swap
void swap(robin_hash &other)
Definition: robin_hash.h:927
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::iterator
typename ht::iterator iterator
Definition: robin_map.h:141
tsl::robin_map::operator==
friend bool operator==(const robin_map &lhs, const robin_map &rhs)
Definition: robin_map.h:776
tsl::detail_robin_hash::robin_hash::min_load_factor
float min_load_factor() const
Definition: robin_hash.h:1071
tsl::robin_map::emplace_hint
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition: robin_map.h:310
tsl::detail_robin_hash::robin_hash::allocator_type
Allocator allocator_type
Definition: robin_hash.h:384
tsl::robin_map::count
size_type count(const Key &key, std::size_t precalculated_hash) const
Definition: robin_map.h:466
tsl::robin_map::ValueSelect::operator()
const value_type & operator()(const std::pair< Key, T > &key_value) const noexcept
Definition: robin_map.h:114
tsl::robin_map::equal_range
std::pair< iterator, iterator > equal_range(const K &key)
Definition: robin_map.h:637
tsl::robin_map::cbegin
const_iterator cbegin() const noexcept
Definition: robin_map.h:215
tsl::robin_map::robin_map
robin_map(std::initializer_list< value_type > init, size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: robin_map.h:194
tsl::detail_robin_hash::robin_hash::try_emplace_hint
iterator try_emplace_hint(const_iterator hint, K &&key, Args &&... args)
Definition: robin_hash.h:815
tsl::robin_map::robin_map
robin_map(const Allocator &alloc)
Definition: robin_map.h:161
PointMatcherSupport::Parametrizable
The superclass of classes that are constructed using generic parameters. This class provides the para...
Definition: Parametrizable.h:98
tsl::robin_map::ht
detail_robin_hash::robin_hash< std::pair< Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, StoreHash, GrowthPolicy > ht
Definition: robin_map.h:126
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::reference
typename ht::reference reference
Definition: robin_map.h:137
tsl::robin_map::clear
void clear() noexcept
Definition: robin_map.h:231
tsl::robin_map::erase_fast
void erase_fast(iterator pos)
Definition: robin_map.h:348
tsl::detail_robin_hash::robin_hash::end
iterator end() noexcept
Definition: robin_hash.h:707
tsl::robin_map::robin_map
robin_map(InputIt first, InputIt last, size_type bucket_count, const Allocator &alloc)
Definition: robin_map.h:174
tsl::robin_map::count
size_type count(const Key &key) const
Definition: robin_map.h:459
tsl::robin_map::insert
iterator insert(const_iterator hint, const value_type &value)
Definition: robin_map.h:247
tsl::robin_map::swap
friend void swap(robin_map &lhs, robin_map &rhs)
Definition: robin_map.h:796
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::size_type
typename ht::size_type size_type
Definition: robin_map.h:132
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::difference_type
typename ht::difference_type difference_type
Definition: robin_map.h:133
tsl::robin_map::at
T & at(const K &key, std::size_t precalculated_hash)
Definition: robin_map.h:432
tsl::robin_map::deserialize
static robin_map deserialize(Deserializer &deserializer, bool hash_compatible=false)
Definition: robin_map.h:768
tsl::detail_robin_hash::robin_hash::get_allocator
allocator_type get_allocator() const
Definition: robin_hash.h:680
init
void init(const M_string &remappings)
tsl::robin_map::erase
size_type erase(const key_type &key)
Definition: robin_map.h:340
tsl::robin_map::insert
void insert(std::initializer_list< value_type > ilist)
Definition: robin_map.h:266
tsl::robin_map::equal_range
std::pair< const_iterator, const_iterator > equal_range(const K &key, std::size_t precalculated_hash) const
Definition: robin_map.h:672
tsl::robin_map::insert
std::pair< iterator, bool > insert(value_type &&value)
Definition: robin_map.h:243
tsl::detail_robin_hash::robin_hash::max_bucket_count
size_type max_bucket_count() const
Definition: robin_hash.h:1055
tsl::robin_map::KeySelect::key_type
Key key_type
Definition: robin_map.h:98
tsl::robin_map::robin_map
robin_map(size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: robin_map.h:158
tsl::robin_map
Definition: robin_map.h:91
tsl::detail_robin_hash::robin_hash::equal_range
std::pair< iterator, iterator > equal_range(const K &key)
Definition: robin_hash.h:1028
tsl::robin_map::KeySelect::operator()
const key_type & operator()(const std::pair< Key, T > &key_value) const noexcept
Definition: robin_map.h:100
tsl::detail_robin_hash::robin_hash::key_type
typename KeySelect::key_type key_type
Definition: robin_hash.h:378
tsl::robin_map::erase
size_type erase(const key_type &key, std::size_t precalculated_hash)
Definition: robin_map.h:355
tsl::robin_map::size
size_type size() const noexcept
Definition: robin_map.h:225
tsl::robin_map::KeySelect::operator()
key_type & operator()(std::pair< Key, T > &key_value) noexcept
Definition: robin_map.h:105
deserializer
Definition: robin-map/tests/utils.h:387
tsl::robin_map::KeySelect
Definition: robin_map.h:96
tsl::robin_map::try_emplace
iterator try_emplace(const_iterator hint, key_type &&k, Args &&... args)
Definition: robin_map.h:330
tsl::robin_map::reserve
void reserve(size_type count_)
Definition: robin_map.h:704
tsl::detail_robin_hash::robin_hash::bucket_count
size_type bucket_count() const
Definition: robin_hash.h:1053
tsl::robin_map::erase
iterator erase(iterator pos)
Definition: robin_map.h:335
tsl::robin_map::insert_or_assign
iterator insert_or_assign(const_iterator hint, key_type &&k, M &&obj)
Definition: robin_map.h:286
tsl::detail_robin_hash::robin_hash::try_emplace
std::pair< iterator, bool > try_emplace(K &&key, Args &&... args)
Definition: robin_hash.h:808
tsl::robin_map< mp2p_icp_filters::PointCloudToVoxelGridSingle::indices_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::voxel_t, mp2p_icp_filters::PointCloudToVoxelGridSingle::IndicesHash >::const_iterator
typename ht::const_iterator const_iterator
Definition: robin_map.h:142
tsl::robin_map::rehash
void rehash(size_type count_)
Definition: robin_map.h:703
tsl::detail_robin_hash::robin_hash::begin
iterator begin() noexcept
Definition: robin_hash.h:687
tsl::detail_robin_hash::robin_hash::iterator
robin_iterator< false > iterator
Definition: robin_hash.h:389
tsl::detail_robin_hash::robin_hash::key_eq
key_equal key_eq() const
Definition: robin_hash.h:1102
YAML_PM::Key
@ Key
Definition: emittermanip.h:57
tsl::robin_map::max_load_factor
float max_load_factor() const
Definition: robin_map.h:689
tsl::detail_robin_hash::robin_hash::insert
std::pair< iterator, bool > insert(P &&value)
Definition: robin_hash.h:741
tsl::robin_map::cend
const_iterator cend() const noexcept
Definition: robin_map.h:219
tsl::detail_robin_hash::robin_hash::load_factor
float load_factor() const
Definition: robin_hash.h:1063
tsl::detail_robin_hash::robin_hash::const_reference
const value_type & const_reference
Definition: robin_hash.h:386
tsl::detail_robin_hash::robin_hash::deserialize
void deserialize(Deserializer &deserializer, bool hash_compatible)
Definition: robin_hash.h:1117


mp2p_icp
Author(s):
autogenerated on Fri Dec 20 2024 03:45:59