HashPairCollectionsPrivate:
CEDAR
DEFINITIONS = {
OPEN HT:HashTables, Collections, PairCollections;
Ability: TYPE ~ {none, image, map};
Abilities: TYPE ~ ARRAY Direction OF Ability;
HashRelation: TYPE ~ REF HashRelationPrivate;
HashRelationPrivate:
TYPE ~
MONITORED
RECORD [
spaces: SpacePair,
ability: Abilities,
bestAbility: Ability,
bestDir: Direction,
tables: ARRAY Direction OF HT.HashTable,
size: LNAT ← 0,
freezeCount: NATURAL ← 0
];
Classes: TYPE ~ ARRAY --leftToRight--Ability OF ARRAY --rightToLeft--Ability OF ARRAY Mutability OF PairCollClass;
classes: READONLY REF Classes;
FetchClass: PROC [ability: Abilities, mutability: Mutability] RETURNS [class: PairCollClass] ~ INLINE {RETURN [classes[ability[leftToRight]][ability[rightToLeft]][mutability]]};
}.