contents index next

20. fsa_m_hash: Mutable Hashes

This module provides a mutable hash datastructure on top of the fsa_hash datastructure.

Here's an overview of the predicates provided:

20.1. List of Predicates

This section lists the predicates defined by this module.

20.1.1. fsa_m_hash_new(-MutableFsaHash[,Size])

Initializes a new MutableFsaHash with size Size; or default size if there is no second argument. The default is determined by the global variable hash_size.

20.1.2. fsa_m_hash_get(+Key,?Val,+MutableFsaHash) fsa_m_hash_get(+Key,?Val,?Default,+MutableFsaHash)

Val is unified with the value associated with Key in MutableFsaHash. If no such key exists in MutableFsaHash already, then the predicate succeeds without binding Val (in the first form) or unifies Val and Default (second form).

20.1.3. fsa_m_hash_put(+Key,?Val,+MutableFsaHash) fsa_m_hash_put(+Key,?OldVal,?Default,?Val,+MutableFsaHash)

The value associated with Key in MutableFsaHash is updated to Val (using the SICStus built-in update_mutable). OldVal is unified with the old value (it it existed) or with Default (if it didn't exist).

contents index next