Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
tpl_linHash.H File Reference

Linear hashing with chaining. More...

#include <iostream>
#include <primes.H>
#include <dlink.H>
#include <tpl_dynArray.H>
#include <tpl_dnode.H>
#include <htlist.H>
#include <hashDry.H>
#include <hash-fct.H>
#include <hash-dry.H>
#include <ah-errors.H>
Include dependency graph for tpl_linHash.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::LinHashBucket< Key >
 Bucket without virtual destructor for a hash table with collision resolution by separate chaining. More...
 
class  Aleph::LinHashBucketVtl< Key >
 Bucket with virtual destructor for a hash table with collision resolution by separate chaining. More...
 
class  Aleph::GenLinearHashTable< Key, BucketType, Cmp >
 Generic linear hash table. More...
 
class  Aleph::GenLinearHashTable< Key, BucketType, Cmp >::Iterator
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Macros

#define LINBUCKET_BODY(BUCKETNAME)
 

Typedefs

template<typename Key , class Cmp = Aleph::equal_to<Key>>
using Aleph::LinearHashTable = GenLinearHashTable< Key, LinHashBucket, Cmp >
 Linear hash table with buckets without virtual destructor.
 
template<typename Key , class Cmp = Aleph::equal_to<Key>>
using Aleph::LinearHashTableVtl = GenLinearHashTable< Key, LinHashBucketVtl, Cmp >
 Linear hash table with virtual destructor in its buckets.
 

Detailed Description

Linear hashing with chaining.

Hash table with linear expansion and separate chaining. Combines benefits of chaining and incremental growth.

Features

  • Incremental bucket splitting
  • Handles high load factors
  • No clustering
See also
tpl_lhash.H Alternative linear hashing
tpl_odhash.H Open addressing
Author
Leandro Rabindranath León

Definition in file tpl_linHash.H.

Macro Definition Documentation

◆ LINBUCKET_BODY

#define LINBUCKET_BODY (   BUCKETNAME)
Value:
\
Dlink link; \
\
public: \
BUCKETNAME(const BUCKETNAME & bucket) \
: Dnode<Key>(bucket) {} \
BUCKETNAME(const Key & key) \
: Dnode<Key>(key) {} \
\
Key & get_key() noexcept { return this->get_data(); } \
\
Dlink * get_link() noexcept { return &link; } \
Node belonging to a double circular linked list with header node.
Definition tpl_dnode.H:106
DynList< T > maps(const C &c, Op op)
Classic map operation.

Definition at line 79 of file tpl_linHash.H.