Module hfs_lhsp

Less hashing, same performance hash function set container.

Copyright © 2010-2011 Zuse Institute Berlin

Version: $Id$

Behaviours: hfs_beh.

Authors: Maik Lange (malange@informatik.hu-berlin.de).

References

Description

Less hashing, same performance hash function set container

Data Types

hfs()

abstract datatype: hfs()

hfs_fun()

hfs_fun() = fun((binary()) -> non_neg_integer() | binary())

itemKey()

itemKey() = any()

Function Index

apply_val/2Applies Val to all hash functions in container HC.
apply_val/3Apply hash function I to given value; I = 1..hfs_size.
apply_val_feeder/3
apply_val_rem/3Applies Val to all hash functions in container HC and returns only remainders of divisions by Rem.
new/1returns a new lhsp hfs with default functions.
new/2
new_feeder/2
size/1Returns number of hash functions in the container.
tester_create_hfs/1
tester_create_hfs_fun/1

Function Details

new/1

new(HFCount :: pos_integer()) -> hfs()

returns a new lhsp hfs with default functions

new_feeder/2

new_feeder(X1 :: {hfs_fun(), hfs_fun()}, HFCount :: pos_integer()) ->
              {[hfs_fun(), ...], pos_integer()}

new/2

new(X1 :: [hfs_fun(), ...], HFCount :: pos_integer()) -> hfs()

apply_val/2

apply_val(X1 :: hfs(), Val :: itemKey()) ->
             [non_neg_integer(), ...]

Applies Val to all hash functions in container HC

apply_val_rem/3

apply_val_rem(HC :: hfs(), Val :: itemKey(), Rem :: pos_integer()) ->
                 [non_neg_integer(), ...]

Applies Val to all hash functions in container HC and returns only remainders of divisions by Rem.

apply_val_feeder/3

apply_val_feeder(X1 :: hfs(),
                 I :: pos_integer(),
                 Val :: itemKey()) ->
                    {hfs(), pos_integer(), itemKey()}

apply_val/3

apply_val(X1 :: hfs(), I :: pos_integer(), Val :: itemKey()) ->
             non_neg_integer()

Apply hash function I to given value; I = 1..hfs_size. NOTE: When multiple different I are needed, prefer apply_val/2 since that function is faster.

size/1

size(X1 :: hfs()) -> pos_integer()

Returns number of hash functions in the container

tester_create_hfs_fun/1

tester_create_hfs_fun(X1 :: 1..2) -> hfs_fun()

tester_create_hfs/1

tester_create_hfs(X1 ::
                      {hfs_lhsp,
                       Hf_count :: 1..100,
                       H1_fun :: hfs_fun(),
                       H2_fun :: hfs_fun()}) ->
                     hfs()


Generated by EDoc, Sep 11 2020, 15:24:37.