next up previous contents index
Next: [] Up: Data Structures Previous: TableExceptionType   Contents   Index


TableType


Usage

TableType(K, V): Category


Parameter Type Description
K PrimitiveType the type of the keys
V Type the type of the entries


Description

TableType(K, V) is the category of tables, i.e. discrete many-to-one mappings from keys to entries. More precisely, every element of a domain of this category is a table whose slots contain elements from V and such that every slot is given by a unique key from K.


Exports

BoundedFiniteDataStructureType Cross(K, V)
[]: Tuple Cross(K, V) $\to$ % creation of a table
apply: (%, K) $\to$ V extraction of an entry
entries: % $\to$ Generator V iterate through the entries
find: (K, %) $\to$ Partial V search for an entry
keys: % $\to$ Generator K iterate through the keys
numberOfEntries: % $\to$ MachineInteger number of entries
set!: (%, K, V) $\to$ V modification of an entry
table: () $\to$ % creation of a table
  MachineInteger $\to$ %  


if $K$ has InputType and $V$ has InputType then

InputType


if $K$ has OutputType and $V$ has OutputType then

OutputType


if $K$ has SerializableType and $V$ has SerializableType then

SerializableType



Subsections
next up previous contents index
Next: [] Up: Data Structures Previous: TableExceptionType   Contents   Index
Manuel Bronstein 2004-06-28