TabulatedComputationPackage(Key , Entry) provides some modest support for dealing with operations with type
Key -> Entry. The result of such operations can be stored and retrieved with this package by using a hash-table. The user does not need to worry about the management of this hash-table. However, only one hash-table is built by calling
TabulatedComputationPackage(Key , Entry).
- clearTable!: () -> Void
clearTable!()clears the hash-table and assumes that it will no longer be used.
- extractIfCan: Key -> Union(Entry, failed)
extractIfCan(x)searches the item whose key is
- initTable!: () -> Void
initTable!()initializes the hash-table.
- insert!: (Key, Entry) -> Void
insert!(x, y)stores the item whose key is
xand whose entry is
- makingStats?: () -> Boolean
trueiff the statistics process is running.
- printInfo!: (String, String) -> Void
printInfo!(x, y)initializes the messages to be printed when manipulating items from the hash-table. If a key is retrieved then
xis displayed. If an item is stored then
- printingInfo?: () -> Boolean
trueiff messages are printed when manipulating items from the hash-table.
- printStats!: () -> Void
printStats!()prints the statistics.
- startStats!: String -> Void
startStats!(x)initializes the statistics process and sets the comments to display when statistics are printed
- usingTable?: () -> Boolean
trueiff the hash-table is used