From: Colin P. A. <co...@co...> - 2008-09-30 09:09:56
|
This looks more useful than just providing an alternative hash code for HASHABLE objects. To take adavantage of it, I suggest new classes, DS_HASH_FUNCTION_TABLE [G, K] and DS_MULTIARRAYED_HASH_FUNCTION_TABLE [G, K] (note the unconstrained genericity). Creation procedures for these classes will possess an additional formal argument of type KL_HASH_FUNCTION [K], and the class invariant will specify that `hash_function' is always non-Void. Given such classes, I don't see the need for `set_hash_function' in DS_HASH_TABLE. It seems to me that it is only muddying the waters to have a class that is specific to HASHABLE, and then not use that property. -- Colin Adams Preston Lancashire |