class FMAP{K,T} < $STR
****

________This_class_provides_an_implementation_of_maps_from_key
___objects_(of_type_K)_to_target_objects_of_type_T_requiring_write-backs.
________In_this_form_void_may_not_be_a_key,_`key_nil'_may_be_redefined._If
___K_is_a_subtype_of_$IS_EQ,_then_`is_eq'_will_be_used_for_key_equality_test
___(eg._string_equality_for_STR),_otherwise_object_equality_is_used.
________If_K_is_a_subtype_of_$HASH,_then_`hash'_will_be_used_for_the_hash
___value,_otherwise_the_element_`id'_will_be_used.


Ancestors
$STR



Public


Features
array : ARRAY{ETP} .. Included as array
build( cursor : STR_CURSOR) : SAME .. Included as build
****
build(cursor : STR_CURSOR, start, finish : CHAR ) : SAME .. Included as build
clear : SAME .. Included as clear
copy : SAME .. Included as copy
count( .. Included as count
count_if( .. Included as count_if
create(cnt : CARD) : SAME .. Included as create
create( str : STR ) : SAME .. Included as create
****
create(str : STR, sep : CHAR ) : SAME .. Included as create
****
create : SAME .. Included as create
**** This routine merely returns void as all insertion routines have
___a_special_case_for_a_void_map.
delete(key : K) : SAME .. Included as delete
elt_eq(first,second : ETP) : BOOL .. Included as elt_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_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_lt(first,second : ETP) : BOOL .. Included as elt_lt
****
________This_routine_is_the_standard_predicate_'less_than'_for_use_in
___sorting.___By_default_the_object_identity_components_are_compared.
___It_may_be_redefined_in_descendants.
elt_nil : ETP .. Included as elt_nil
****
________This_routine_returns_the_NIL_value.___If_the_element_class_is_a
___subclass_of_$NIL_then_it_returns_nil,_otherwise_void.
equals(other : $RO_MAP{K,T}) : BOOL .. Included as equals
****
________This_routine_returns_true_if_and_only_if_all_of_the_elements_of_other
___are_identical_to_those_of_self.
___NOTE_This_will_only_become_a_useful_routine_when_FMAP_can_be_sub-typed
________under_$RO_MAP
every( .. Included as every
exists( .. Included as exists
exists( .. Included as exists
get(key : K) : T .. Included as get
get_pair(key : K) : TUP{K,T} .. Included as get_pair
has(elem : T) : BOOL .. Included as has
**** This predicate returns true if and only if the given element is in
___the_range_of_the_map.
has_ind(key : K) : BOOL .. Included as has_ind
**** This routine returns true if and only if self contains an entry with the given key.
insert(key : K,target : T) : SAME .. Included as insert
****
insert_pair(pair : TUP{K,T}) : SAME .. Included as insert_pair
inspect:STR .. Included as inspect
**** This routine returns a string representation of the contents of self. K.Kodama
is_elt_nil( elem : ETP) : BOOL .. Included as is_elt_nil
**** This predicate returns true if and only if elem is NIL.
is_empty : BOOL .. Included as is_empty
**** This predicate returns true if and only if the map is empty. Self may be void.
is_elt_nil( elem : ETP) : BOOL .. Included as is_key_nil
**** This predicate returns true if and only if elem is NIL.
elt_eq(first,second : ETP) : BOOL .. Included as 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 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 key_nil
****
________This_routine_returns_the_NIL_value.___If_the_element_class_is_a
___subclass_of_$NIL_then_it_returns_nil,_otherwise_void.
n_inds : CARD .. Included as n_inds
**** This routine returns the number of 'indices' in the map. Self may be void.
not_every( .. Included as not_every
not_exists( .. Included as not_exists
size : CARD .. Included as size
str( lib : LIBCHARS ) : STR .. Included as str
str(lib : LIBCHARS, sep : CHAR ) : STR .. Included as str
str : STR .. Included as str
****
__This_routine_returns_a_string_representation_of_the_contents_of_self
__in_the_default_repertoire_and_encoding.
test(key : K) : BOOL .. Included as test
**** This predicate returns true if and only if the map contains an element
___mapped_by_the_given_key.__Note_that_the_value_zero_for_a_numeric_key_is
___perfectly_valid.

Iters
elt! : T .. Included as elt!
filter!( .. Included as filter!
ind! : K .. Included as ind!
keys! : K .. Included as keys!
not_filter!( .. Included as not_filter!
pair! : TUP{K,T} .. Included as pair!
pairs! : TUP{K,T} .. Included as pairs!
target! : T .. Included as target!
targets! : T .. Included as targets!
unique! : ETP .. Included as unique!


Private

const Default_Array_Size : CARD := 5 ; .. Included as Default_Array_Size
const Default_Size : CARD := 5 ; .. Included as Default_Size
const Spare_Min : CARD := 50 ; .. Included as Spare_Min
aclear .. Included as aclear
acopy(beg, num, srcbeg : CARD, src : SAME) .. Included as acopy
acopy(beg, num : CARD, src : SAME) .. Included as acopy
acopy(beg : CARD, src : SAME) .. Included as acopy
acopy(src : SAME) .. Included as acopy
aelt!(once beg : CARD) : ELT .. Included as aelt!
aelt!(once beg, once num : CARD) : ELT .. Included as aelt!
aelt!(once beg,once num : CARD,once step : INT) : ELT .. Included as aelt!
aelt! : ELT .. Included as aelt!
aget(index : CARD) : ELT .. Included as aget
aget(index : INT) : ELT .. Included as aget
aind! : CARD .. Included as aind!
allocate(cnt : CARD) : SAME .. Included as allocate
array_ptr : REFERENCE .. Included as array_ptr
aset!(val : ELT) .. Included as aset!
aset!(once beg : CARD,val : ELT) .. Included as aset!
aset!(once beg, once num : CARD, val : ELT) .. Included as aset!
aset!(once beg, once num : CARD, once step : INT,val : ELT) .. Included as aset!
aset(index : CARD, val : ELT) .. Included as aset
aset(index : INT, val:ELT) .. Included as aset
asize : CARD .. Included as asize
build(cursor : STR_CURSOR, sep : CHAR_CODE, start : CHAR, finish : CHAR ) : SAME .. Included as build
double_size : SAME .. Included as double_size
for_all(first, second : SAME) : BOOL .. Included as for_all
****
__This_private_predicate_returns_true_if_and_only_if_all_elements_of
___first_and_second_are_the_same!
halve_size : SAME .. Included as halve_size
attr hsize : CARD ; .. Included as hsize
**** Number of stored entries
attr hsize : CARD ; .. Included as hsize
**** Number of stored entries
is_legal_aelts_arg(beg, num : CARD, step : INT) : BOOL .. Included as is_legal_aelts_arg
**** This predicate returns true if and only if the arguments are legal
___values_for_aelt_and_aset_iters_below.
const load_ratio : CARD := 4 ; .. Included as load_ratio
**** Allow at most 1/load_ratio full
not_too_many(start,finish : CARD) : BOOL .. Included as not_too_many
**** This private predicate returns true if and only if hashing delays
___are_likely_to_be_severely_affecting_performance,_otherwise_false.
should_grow : BOOL .. Included as should_grow
**** This private predicate returns true if and only if the size of self
___should_be_increased_to_avoid_hashing_delays.
should_shrink : BOOL .. Included as should_shrink
**** This private predicate returns true if and only if the size of self
___should_be_reduced.

The Sather Home Page