function lfds711_hash_a_iterate

From liblfds.org
Revision as of 18:11, 16 February 2017 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files

└───liblfds711
    ├───inc
    │   └───liblfds711
    │           lfds711_hash_addonly.h
    └───src
        └───llfds711_hash_addonly
                lfds711_hash_addonly_iterate.c

Opaque Structures

struct lfds711_hash_a_element;
struct lfds711_hash_a_iterate;

Prototype

int lfds711_hash_a_iterate( struct lfds711_hash_a_iterate *hai, struct lfds711_hash_a_element **hae );

Parameters

struct lfds711_hash_a_iterate *hai

A pointer to an initialized struct lfds711_hash_a_iterate.

struct lfds711_hash_a_element **hae

Set to point to the next element in the iteration.

Return Value

Returns 1 on a successful iteration. Returns 0 when iteration is complete.

Notes

This function iterates over the hash elements. The underlying data structure is an array of btrees, and the function iterates over each btree, performing a smallest-to-largest walk on each btree. As such the iteration is overall unordered, but proceeds in ordered blocks. Any elements which are added to the hash during iteration may or may not be seen - it depends on whether or not they turn up 'in front' of the current position of the iterator.

See Also