class DYNAMIC_BUCKET_TABLE{ELT,BKT < $BUCKET{ELT,BKT}} |
---|
**** | This class implements a hash table using dynamic buckets as described
___in_Per-Ake_Larson;_Communications_of_the_ACM_Vol.31_(1988)_P.446-457. ________The_directory/segment_structure_has_been_changed_in_favour_of ___a_dymnamically_changing_array_as_storage_area. |
COMPARE{_} |
attr n_inds : CARD ; |
---|
**** | This gives the number of elements (resp. indices) in the table. |
bucket(index : CARD) : BKT .. Included as bucket |
---|
create : SAME .. Included as create |
---|
**** | This routine creates a new hash table which has a default size if
___self_is_void,_otherwise_half_the_size_of_self. |
create_sized(initial_size : CARD) : SAME |
---|
elt_eq(first,second : ETP) : BOOL .. Included as elt_key_eq |
---|
**** | This is the standard 'less than' predicate used in sorting routines.
___The_using_class_must_specify_an_equality_predicate_routine. |
elt_hash(elem : $OB) : CARD .. Included as elt_key_hash |
---|
**** |
________This_routine_returns_a_hash_value_associated_with_an_element._This ___must_have_the_property_that_if_"elt_eq(first,second)"_then ___"elt_hash(first)=elt_hash(second)"._It_could_be_defined_always_to_return_0, ___but_many_routines_will_then_become_quadratic._This_uses_the_object_"id"_by ___default.___It_may_be_redefined_in_descendants. |
elt_nil : ETP .. Included as elt_key_nil |
---|
**** |
________This_routine_returns_the_NIL_value.___If_the_element_class_is_a ___subclass_of_$NIL_then_it_returns_nil,_otherwise_void. |
map_copy : SAME .. Included as map_copy |
---|
set_bucket(index : CARD, bucket : BKT) .. Included as set_bucket |
---|
const Default_Size : CARD := 16 ; |
---|
attr asize : CARD ; |
---|
**** | This is the size of the fraction of store which is currently in use.
___Array_access_beyond_this_bound_is_illegal. |
attr asize : CARD ; |
---|
**** | This is the size of the fraction of store which is currently in use.
___Array_access_beyond_this_bound_is_illegal. |
attr bound : CARD ; |
---|
**** | This gives the upper bound for split_pos. Is always initial_size * 2.pow(doubles). |
attr bound : CARD ; |
---|
**** | This gives the upper bound for split_pos. Is always initial_size * 2.pow(doubles). |
attr doubles : CARD ; |
---|
**** | The number of times the initial table size has been doubled. |
attr doubles : CARD ; |
---|
**** | The number of times the initial table size has been doubled. |
grow .. Included as grow |
---|
hash(elem : ELT) : CARD .. Included as hash |
---|
shared lower_fill_ratio : FLT := 0.800 ; |
---|
shared lower_fill_ratio : FLT := 0.800 ; |
---|
attr minsize : CARD ; |
---|
**** | This is the lower bound for the store size. |
attr minsize : CARD ; |
---|
**** | This is the lower bound for the store size. |
attr n_inds : CARD ; |
---|
**** | This gives the number of elements (resp. indices) in the table. |
shrink .. Included as shrink |
---|
attr split_pos : CARD ; |
---|
**** | This is the position of the next bucket to split. |
attr split_pos : CARD ; |
---|
**** | This is the position of the next bucket to split. |
attr store : AREF{BKT} ; |
---|
**** | The data being stored. |
attr store : AREF{BKT} ; |
---|
**** | The data being stored. |
update_delete .. Included as update_delete |
---|
update_insert .. Included as update_insert |
---|
shared upper_fill_ratio : FLT := 1.000 ; |
---|
**** | These two bounds are specified for efficient memory usage. For fast
___access_the_ratio_between_the_number_of_elements_and_the_number_of_cells ___should_be_low.___For_efficient_memory_usage_the_converse_is_true.___Unless ___the_list_is_really_small_the_ration_should_be_between_the_above_bounds. |
shared upper_fill_ratio : FLT := 1.000 ; |
---|
**** | These two bounds are specified for efficient memory usage. For fast
___access_the_ratio_between_the_number_of_elements_and_the_number_of_cells ___should_be_low.___For_efficient_memory_usage_the_converse_is_true.___Unless ___the_list_is_really_small_the_ration_should_be_between_the_above_bounds. |