Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::HashMap< Key, Data, HashMapTable, Cmp > Struct Template Reference

#include <tpl_hash.H>

Inheritance diagram for Aleph::HashMap< Key, Data, HashMapTable, Cmp >:
[legend]
Collaboration diagram for Aleph::HashMap< Key, Data, HashMapTable, Cmp >:
[legend]

Public Types

typedef HashMapTable< Key, Data, CmpBase
 

Public Member Functions

void add (std::initializer_list< Key > lk, std::initializer_list< Data > ld)
 
 HashMap ()
 
 HashMap (std::initializer_list< Key > lk, std::initializer_list< Data > ld)
 
template<template< typename T > class Container = DynList>
 HashMap (const Container< Key > &c, std::initializer_list< Data > ld)
 
const Data & operator[] (const Key &key) const
 
Data & operator[] (const Key &key)
 
void clear ()
 Empties the container.
 
bool is_empty () const noexcept
 Checks if the container is empty.
 

Detailed Description

template<typename Key, typename Data, template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
struct Aleph::HashMap< Key, Data, HashMapTable, Cmp >

Definition at line 109 of file tpl_hash.H.

Member Typedef Documentation

◆ Base

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
typedef HashMapTable<Key, Data, Cmp> Aleph::HashMap< Key, Data, HashMapTable, Cmp >::Base

Definition at line 111 of file tpl_hash.H.

Constructor & Destructor Documentation

◆ HashMap() [1/3]

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
Aleph::HashMap< Key, Data, HashMapTable, Cmp >::HashMap ( )
inline

Definition at line 125 of file tpl_hash.H.

◆ HashMap() [2/3]

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
Aleph::HashMap< Key, Data, HashMapTable, Cmp >::HashMap ( std::initializer_list< Key >  lk,
std::initializer_list< Data >  ld 
)
inline

◆ HashMap() [3/3]

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
template<template< typename T > class Container = DynList>
Aleph::HashMap< Key, Data, HashMapTable, Cmp >::HashMap ( const Container< Key > &  c,
std::initializer_list< Data >  ld 
)
inline

Definition at line 134 of file tpl_hash.H.

References ah_range_error_if, and Aleph::divide_and_conquer_partition_dp().

Member Function Documentation

◆ add()

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
void Aleph::HashMap< Key, Data, HashMapTable, Cmp >::add ( std::initializer_list< Key >  lk,
std::initializer_list< Data >  ld 
)
inline

◆ clear()

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
void Aleph::HashMap< Key, Data, HashMapTable, Cmp >::clear ( )
inline

Empties the container.

Exceptions
none
See also
empty()

Definition at line 153 of file tpl_hash.H.

◆ is_empty()

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
bool Aleph::HashMap< Key, Data, HashMapTable, Cmp >::is_empty ( ) const
inlinenoexcept

Checks if the container is empty.

Returns
true if empty, false otherwise.
Exceptions
none

Definition at line 162 of file tpl_hash.H.

Referenced by Aleph::Transposition_Table< Key, Entry, HashMapTable, Cmp, ReplacePolicy >::is_empty().

◆ operator[]() [1/2]

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
Data & Aleph::HashMap< Key, Data, HashMapTable, Cmp >::operator[] ( const Key &  key)
inline

Definition at line 146 of file tpl_hash.H.

◆ operator[]() [2/2]

template<typename Key , typename Data , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
const Data & Aleph::HashMap< Key, Data, HashMapTable, Cmp >::operator[] ( const Key &  key) const
inline

Definition at line 146 of file tpl_hash.H.


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