Concept:HashTableHash tables can be seen in many implementations, with the following
variations.
- Compare function : fixed or user-customizable
- Hash function : fixed or user-customizable
- External representation
- API
- Compare and hash: User-customizable by make-hashtable.
The fixed ones are also provided by make-eq-hashtable and make-eqv-hashtable.
- External: no
- API: make-eq-hashtable, make-eqv-hashtable, make-hashtable,
hashtable?, hashtable-size, hashtable-ref, hashtable-set!,
hashtable-delete!, hashtable-contains?, hashtable-update!,
hashtable-copy, hashtable-clear!, hashtable-keys,
hashtable-entries, hashtable-equivalence-function,
hashtable-hash-function, hashtable-mutable?,
equal-hash, string-hash, string-ci-hash, symbol-hash
- Compare : (fixed?)
- Hash : (fixed?)
- External : no
- API : make-hashtable, hashtable?, hashtable-size,
hashtable-get, hashtable-put!, hashtable-remove!,
hashtable-update!, hashtable->vector, hashtable->list,
hashtable-for-each?, object-hashnumber?
- Compare : eq?, eqv?, equal?, string=?; user-defined object
can have its own equality function via object-equal?? method.
- Hash : user-defined object can have its own hash function via
object-hash method.
- External : No
- API : make-hash-table, hash-table-get, hash-table-put!,
hash-table-delete!, hash-table-clear!, hash-table-update!, hash-table-push!, hash-table-pop!,
hash-table-exists?, hash-table?, hash-table-map,
hash-table-for-each, hash-table-keys, hash-table-values
- Compare : user specified
- Hash : user specified
- External : ?
- API : make-eq-hash-table?, make-eqv-hash-table?,
make-equal-hash-table?, make-string-hash-table?,
strong-hash-table-constructor?, weak-hash-table-constructor?,
hash-table?, hash-table/put!?, hash-table/get?,
hash-table/remove!?, hash-table/clear!?, hash-table/count?,
hash-table->alist, hash-table/key-list?, hash-table/datum-list?,
hash-table/for-each?, hash-table/lookup?
- Compare : eq?, eqv?, string=?, =, or user-specified
- Hash : system default or user specified.
- External : No
- API : make-table, make-symbol-table, make-string-table,
make-integer-table, make-table-maker, make-table-immutable!,
table?, table-ref, table-set!, table-walk,
default-hash-function, string-hash
- Compare : user-specified (default equal?)
- Hash : user-specified (defaults to an appropriate hash function for the given compare function)
- External : No
- API : See SRFI-69
code rio
|