Node: Primitive Hash Function, Previous: Hash Table Functions, Up: Hash Tables



Primitive Hash Function

The primitive hash function sxhash is used internally by the Lpp hash functions but is made public so that the user can create other hashing structures.

sxhash object Function

sxhashL object Function

sxhash returns a hash code positive integer for the Lpp object object as an int. The returned integer is such that for given objects obj1 and obj2

     equal(obj1, obj2) => sxhash(obj1) == sxhash(obj2)
     

So for example two different strings "abc" will return the same sxhash integer. The function sxhashL is exactly the same except that it returns an Lpp Integer object and it is guaranteed that for a given object obj

     sxhash(obj) == iL(sxhashL(obj))