Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B > Struct Template Reference

#include <champ.hpp>

+ Collaboration diagram for immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >:

Classes

struct  sub_result
 

Public Types

using node_t = node< T, Hash, Equal, MemoryPolicy, B >
 
using bitmap_t = typename get_bitmap_type< B >::type
 

Public Member Functions

 champ (node_t *r, size_t sz)
 
 champ (const champ &other)
 
 champ (champ &&other)
 
champoperator= (const champ &other)
 
champoperator= (champ &&other)
 
 ~champ ()
 
void inc () const
 
void dec () const
 
template<typename Fn >
void for_each_chunk (Fn &&fn) const
 
template<typename Fn >
void for_each_chunk_traversal (node_t *node, count_t depth, Fn &&fn) const
 
template<typename Project , typename Default , typename K >
decltype(auto) get (const K &k) const
 
std::pair< node_t *, bool > do_add (node_t *node, T v, hash_t hash, shift_t shift) const
 
champ add (T v) const
 
template<typename Project , typename Default , typename Combine , typename K , typename Fn >
std::pair< node_t *, bool > do_update (node_t *node, K &&k, Fn &&fn, hash_t hash, shift_t shift) const
 
template<typename Project , typename Default , typename Combine , typename K , typename Fn >
champ update (const K &k, Fn &&fn) const
 
template<typename K >
sub_result do_sub (node_t *node, const K &k, hash_t hash, shift_t shift) const
 
template<typename K >
champ sub (const K &k) const
 
template<typename Eq = Equal>
bool equals (const champ &other) const
 

Static Public Member Functions

static const champempty ()
 
template<typename Eq >
static bool equals_tree (const node_t *a, const node_t *b, count_t depth)
 
template<typename Eq >
static bool equals_values (const T *a, const T *b, count_t n)
 
template<typename Eq >
static bool equals_collisions (const T *a, const T *b, count_t n)
 

Public Attributes

node_troot
 
size_t size
 

Static Public Attributes

static constexpr auto bits = B
 

Friends

void swap (champ &x, champ &y)
 

Detailed Description

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
struct immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >

Definition at line 25 of file champ.hpp.

Member Typedef Documentation

◆ bitmap_t

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
using immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::bitmap_t = typename get_bitmap_type<B>::type

Definition at line 30 of file champ.hpp.

◆ node_t

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
using immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::node_t = node<T, Hash, Equal, MemoryPolicy, B>

Definition at line 29 of file champ.hpp.

Constructor & Destructor Documentation

◆ champ() [1/3]

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::champ ( node_t r,
size_t  sz 
)
inline

Definition at line 46 of file champ.hpp.

◆ champ() [2/3]

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::champ ( const champ< T, Hash, Equal, MemoryPolicy, B > &  other)
inline

Definition at line 51 of file champ.hpp.

◆ champ() [3/3]

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::champ ( champ< T, Hash, Equal, MemoryPolicy, B > &&  other)
inline

Definition at line 57 of file champ.hpp.

◆ ~champ()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::~champ ( )
inline

Definition at line 83 of file champ.hpp.

Member Function Documentation

◆ add()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
champ immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::add ( v) const
inline

◆ dec()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
void immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::dec ( ) const
inline

◆ do_add()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
std::pair<node_t*, bool> immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::do_add ( node_t node,
v,
hash_t  hash,
shift_t  shift 
) const
inline

◆ do_sub()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename K >
sub_result immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::do_sub ( node_t node,
const K &  k,
hash_t  hash,
shift_t  shift 
) const
inline

◆ do_update()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Project , typename Default , typename Combine , typename K , typename Fn >
std::pair<node_t*, bool> immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::do_update ( node_t node,
K &&  k,
Fn &&  fn,
hash_t  hash,
shift_t  shift 
) const
inline

Definition at line 230 of file champ.hpp.

◆ empty()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
static const champ& immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::empty ( )
inlinestatic

◆ equals()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Eq = Equal>
bool immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::equals ( const champ< T, Hash, Equal, MemoryPolicy, B > &  other) const
inline

◆ equals_collisions()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Eq >
static bool immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::equals_collisions ( const T *  a,
const T *  b,
count_t  n 
)
inlinestatic

Definition at line 459 of file champ.hpp.

◆ equals_tree()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Eq >
static bool immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::equals_tree ( const node_t a,
const node_t b,
count_t  depth 
)
inlinestatic

Definition at line 431 of file champ.hpp.

◆ equals_values()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Eq >
static bool immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::equals_values ( const T *  a,
const T *  b,
count_t  n 
)
inlinestatic

Definition at line 453 of file champ.hpp.

◆ for_each_chunk()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Fn >
void immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::for_each_chunk ( Fn &&  fn) const
inline

Definition at line 100 of file champ.hpp.

◆ for_each_chunk_traversal()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Fn >
void immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::for_each_chunk_traversal ( node_t node,
count_t  depth,
Fn &&  fn 
) const
inline

◆ get()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Project , typename Default , typename K >
decltype(auto) immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::get ( const K &  k) const
inline

Definition at line 125 of file champ.hpp.

◆ inc()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
void immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::inc ( ) const
inline

Definition at line 88 of file champ.hpp.

◆ operator=() [1/2]

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
champ& immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::operator= ( const champ< T, Hash, Equal, MemoryPolicy, B > &  other)
inline

Definition at line 63 of file champ.hpp.

◆ operator=() [2/2]

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
champ& immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::operator= ( champ< T, Hash, Equal, MemoryPolicy, B > &&  other)
inline

Definition at line 70 of file champ.hpp.

◆ sub()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename K >
champ immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::sub ( const K &  k) const
inline

◆ update()

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
template<typename Project , typename Default , typename Combine , typename K , typename Fn >
champ immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::update ( const K &  k,
Fn &&  fn 
) const
inline

Definition at line 310 of file champ.hpp.

Friends And Related Function Documentation

◆ swap

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
void swap ( champ< T, Hash, Equal, MemoryPolicy, B > &  x,
champ< T, Hash, Equal, MemoryPolicy, B > &  y 
)
friend

Member Data Documentation

◆ bits

template<typename T, typename Hash, typename Equal, typename MemoryPolicy, bits_t B>
constexpr auto immer::detail::hamts::champ< T, Hash, Equal, MemoryPolicy, B >::bits = B
static

Definition at line 27 of file champ.hpp.

◆ root

◆ size


The documentation for this struct was generated from the following file:
Released under the MIT license