Jump to content

Bidirectional map

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by User382435824 (talk | contribs) at 02:29, 29 July 2016 (Add link to bidict, a bidirectional map implementation for Python, to External links). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, a bidirectional map, or hash bag, is an associative data structure in which the pairs form a one-to-one correspondence. Thus the binary relation is functional in each direction: can also act as a key to . A pair thus provides a unique coupling between and so that can be found when is used as a key and can be found when is used as a key.