aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
gum::HashTableConst Class Reference

Parameters specifying the default behavior of the hashtables. More...

#include <agrum/base/core/hashTable.h>

Collaboration diagram for gum::HashTableConst:

Static Public Attributes

static constexpr Size default_size {Size(4)}
 The default number of slots in hashtables.
static constexpr Size default_mean_val_by_slot {Size(3)}
 The average number of elements admissible by slots.
static constexpr bool default_resize_policy {true}
 A Boolean indicating whether inserting too many values into the hashtable makes it resize itself automatically.
static constexpr bool default_uniqueness_policy {true}
 A Boolean indicating the default behavior when trying to insert more than once elements with identical keys.

Detailed Description

Parameters specifying the default behavior of the hashtables.

Definition at line 94 of file hashTable.h.

Member Data Documentation

◆ default_mean_val_by_slot

Size gum::HashTableConst::default_mean_val_by_slot {Size(3)}
staticconstexpr

The average number of elements admissible by slots.

Once this number is reached, the size of the hashtable is automatically doubled if we are in automatic resize mode.

Definition at line 108 of file hashTable.h.

108{Size(3)};
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition types.h:74

Referenced by gum::HashTable< Key, Val >::_insert_(), and gum::HashTable< Key, Val >::resize().

◆ default_resize_policy

bool gum::HashTableConst::default_resize_policy {true}
staticconstexpr

A Boolean indicating whether inserting too many values into the hashtable makes it resize itself automatically.

true = automatic, false = manual.

Definition at line 115 of file hashTable.h.

115{true};

Referenced by gum::Bijection< const DiscreteVariable *, const DiscreteVariable * >::Bijection(), and gum::HashTable< T1, T2 * >::HashTable().

◆ default_size

Size gum::HashTableConst::default_size {Size(4)}
staticconstexpr

The default number of slots in hashtables.

By default, hashtables can store up to thrice the number of slots elements before their size is increased To each slot corresponds a chained list of elements with the same hashed key.

Definition at line 101 of file hashTable.h.

101{Size(4)};

Referenced by gum::Bijection< const DiscreteVariable *, const DiscreteVariable * >::Bijection(), gum::CliqueGraph::CliqueGraph(), gum::HashTable< T1, T2 * >::HashTable(), gum::SequenceImplementation< Key, std::is_scalar< Key >::value >::SequenceImplementation(), gum::Set< Edge >::Set(), and gum::SequenceImplementation< Key, std::is_scalar< Key >::value >::_insert_().

◆ default_uniqueness_policy

bool gum::HashTableConst::default_uniqueness_policy {true}
staticconstexpr

A Boolean indicating the default behavior when trying to insert more than once elements with identical keys.

true = do not insert the elements but the first one and throw an exception after the first insertion; false = insert the elements without complaining.

Definition at line 123 of file hashTable.h.

123{true};

Referenced by gum::HashTable< T1, T2 * >::HashTable().


The documentation for this class was generated from the following file: