Next: , Previous: , Up: syslib   [Index]


12.22 Low level hashtable objects operations

The following bindings are exported by the library (vicare system $hashtables).

Unsafe Operation: $string-hash string
Unsafe Operation: $string-hash string max-len

Return an integer hash value for string, based on its current contents. This hash function is suitable for use with string=? as an equivalence function.

About the max-len argument:

NOTE When the hash value is computed using a number of characters N less than the string length: applications must not assume that two strings having the first N characters equal will have the same hash value.

Unsafe Operation: $string-ci-hash string
Unsafe Operation: $string-ci-hash string max-len

Return an integer hash value for string based on its current contents, ignoring case. This hash function is suitable for use with string-ci=? as an equivalence function.

The optional argument max-len is used as in $string-hash.

Unsafe Operation: $symbol-hash symbol

Return an integer hash value for symbol.

Unsafe Operation: $bytevector-hash bytevector
Unsafe Operation: $bytevector-hash bytevector max-len

Return an integer hash value for bytevector, based on its current contents. This hash function is suitable for use with bytevector=? as an equivalence function.

About the max-len argument:

NOTE When the hash value is computed using a number of bytes N less than the bytevector length: applications must not assume that two bytevectors having the first N bytes equal will have the same hash value.

Unsafe Operation: $vector-hash vec
Unsafe Operation: $vector-hash vec max-len

Return a non–negative fixnum representing the hash value for vec, based on its current contents. When creating hash tables using vectors as keys: this hash function is suitable for use with vector=? as an equivalence function.

About the max-len argument:

NOTE When the hash value is computed using a number of items N less than the vector length: applications must not assume that two vectors having the first N items equal will have the same hash value.

Unsafe Operation: $list-hash ell
Unsafe Operation: $list-hash ell max-len

Return a non–negative fixnum representing the hash value for ell, based on its current contents. When creating hash tables using lists as keys: this hash function is suitable for use with list=? as an equivalence function.

About the max-len argument:

NOTE When the hash value is computed using a number of items N less than the list length: applications must not assume that two lists having the first N items equal will have the same hash value.

Unsafe Operation: $pair-hash pair
Unsafe Operation: $ipair-hash ipair

Hash function for pairs and immutable pairs.

Unsafe Operation: $char-hash ch
Unsafe Operation: $char-ci-hash ch

Compute and return the hash value.

Unsafe Operation: $fixnum-hash fx

Compute and return the hash value.

Unsafe Operation: $bignum-hash bn

Compute and return the hash value.

Unsafe Operation: $exact-integer-hash ei

Compute and return the hash value.

Unsafe Operation: $ratnum-hash rn

Compute and return the hash value.

Unsafe Operation: $flonum-hash fl

Compute and return the hash value.

Unsafe Operation: $cflonum-hash cfl

Compute and return the hash value.

Unsafe Operation: $compnum-hash cn

Compute and return the hash value.

Unsafe Operation: $transcoder-hash tran

Compute and return the hash value.

Unsafe Operation: $enum-set-hash es

Hash function for enumeration sets.

Unsafe Operation: $pointer-hash ptr

Return a fixnum representing the hash value of ptr.

Unsafe Operation: $promise-hash prom

Hash function for promise objects.

Unsafe Operation: $record-hash reco
Unsafe Operation: $struct-hash stru

Compute and return the hash value.

NOTE The result returned by these hash functions depends on the values in the fields, so: it will change if the fields are mutated.

Unsafe Operation: $hashtable-type-descriptor table
Unsafe Operation: $hashtable-type-descriptor-set! table des

Setter and getter for the hashtable run–time type descriptor. des must be an instance of <hashtable-type-descr>.


Next: , Previous: , Up: syslib   [Index]