TabulatedComputationPackage(Key, Entry)ΒΆ

newdata.spad line 25

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 x.
initTable!: () -> Void
initTable!() initializes the hash-table.
insert!: (Key, Entry) -> Void
insert!(x, y) stores the item whose key is x and whose entry is y.
makingStats?: () -> Boolean
makingStats?() returns true iff 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 x is displayed. If an item is stored then y is displayed.
printingInfo?: () -> Boolean
printingInfo?() returns true iff 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
usingTable?() returns true iff the hash-table is used