Method ADT.CritBit.FloatTree()->encode_key()


Method encode_key
Method decode_key

float|int encode_key(mixed o)
mixed decode_key(float|int o)

Description

These callbacks can be implemented when inheriting FloatTree in order to allow for arbitrary key types. encode_key is similar to the lfun::_hash() callback. This only works as expected when it is possible to implement a unique representation for keys. These callbacks are called everytime a key is stored or indexed in the tree.