File Exchange

image thumbnail

Use a hash table

version 1.0 (4.57 KB) by

(Java class wrapper)

4 Downloads

Updated

View License

Class Hashtable offers Matlab users access to the hash table data structure.
The class allows multiple key-value pairs specified in 'get', 'put' and 'remove' methods, using cell arrays to collect inputs and outputs, and offers vector forms of 'iskey' and 'isvalue', as well as the option to initialize a hash table with an initial key/value set.

Note that Java's involvement limits the range of types that can be stored in a Hashtable instance.

Comments and Ratings (1)

Dimitri Shvorob

.. To elaborate that last sentence. Scalars and strings are fine; numeric and cell arrays are fine (except for row vectors, which get transposed), structures are no-go, and neither are objects. Clearly, this is not a 100% satisfactory solution.

Updates

1.0

BSD

minor change

MATLAB Release
MATLAB 7.4 (R2007a)
Acknowledgements

Inspired by: Simle Hashtable

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

@Hashtable/

@Hashtable/private/