libhatchet
Loading...
Searching...
No Matches
hxflat_map.hpp File Reference

Go to the source code of this file.

Classes

class  hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >
class  hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::const_iterator
class  hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator

Functions

template<typename key_t_, typename mapped_t_, typename compare_t_, bool multi_t_, hxsize_t capacity_x_, hxsize_t capacity_y_>
bool hxkey_equal (const hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_x_ > &x_, const hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_y_ > &y_)
template<typename key_t_, typename mapped_t_, typename compare_t_, bool multi_t_, hxsize_t capacity_x_, hxsize_t capacity_y_>
bool hxkey_less (const hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_x_ > &x_, const hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_y_ > &y_)
template<typename key_t_, typename mapped_t_, typename compare_t_, bool multi_t_>
void hxswap (hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, hxallocator_dynamic_capacity > &x_, hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, hxallocator_dynamic_capacity > &y_) noexcept

Detailed Description

A sorted flat map and multimap backed by two parallel arrays of keys and values.

Function Documentation

◆ hxkey_equal()

template<typename key_t_, typename mapped_t_, typename compare_t_, bool multi_t_, hxsize_t capacity_x_, hxsize_t capacity_y_>
bool hxkey_equal ( const hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_x_ > & x_,
const hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_y_ > & y_ )
inline

bool hxkey_equal(hxflat_map<K,V>& x, hxflat_map<K,V>& y) - Compares the contents of x and y for equivalence.

◆ hxkey_less()

template<typename key_t_, typename mapped_t_, typename compare_t_, bool multi_t_, hxsize_t capacity_x_, hxsize_t capacity_y_>
bool hxkey_less ( const hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_x_ > & x_,
const hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_y_ > & y_ )
inline

bool hxkey_less(hxflat_map<K,V>& x, hxflat_map<K,V>& y) - Compares the contents of x and y lexicographically using hxkey_equal and hxkey_less on keys and values.

◆ hxswap()

template<typename key_t_, typename mapped_t_, typename compare_t_, bool multi_t_>
void hxswap ( hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, hxallocator_dynamic_capacity > & x_,
hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, hxallocator_dynamic_capacity > & y_ )
inlinenoexcept

void hxswap(hxflat_map<K,V>& x, hxflat_map<K,V>& y) - Exchanges the contents of x and y.

Only works with hxallocator_dynamic_capacity. Dynamically allocated arrays are swapped with very little overhead.