Lib:Architecture/Base Layer/Hash Module

From GNUpdf

Library Module
Hash Module
Layer Base
API Documentation Reference Manual
Source Files src/base/pdf-hash.h

src/base/pdf-hash.c

Contents

Overview

The Hash module provides procedures to work with Hash tables. Thus, for a given table T, an element entry E, an associated key K and a determined function F, we have that T(F(K)) = E (in case no hash collision is detected). This gives constant access time. In case of a hash collision the module knows how to deal with it but constant access time is not guaranteed.

Value types

A hash table can store elements of any type.

Basic operations

Table construction and destruction

Procedures to create and destroy hash tables are defined.

Element addition and removal

Procedures to add and remove an element of a valid type given a specified key are defined.

Element Search

Procedures to search an element of a valid type given a specified key are defined.