Boost logo

Boost :

Subject: Re: [boost] [Tokenmap] A (perfect) hash container library chcked-in to sandbox (RFC)
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-02-21 18:44:18


On 21.02.2010 23:59, Slawomir Lisznianski wrote:
> http://svn.boost.org/svn/boost/sandbox/tokenmap/libs/tokenmap/doc/html/index.html
>
> A tokenmap is a data structure that uniquely maps pseudo-random
> generated keys with elements of the collection.
>
> Boost.Tokenmap is a (perfect) hash container library for C++. An
> important distinction between tokenmap and other dictionary-like
> containers, such as std::map or Boost.Unordered, is that tokenmap
> generates keys internally (referred to as "tokens") rather than
> relying on user to provide them. Specifically, when a new element is
> inserted into the tokenmap, an apparently random key is returned back
> to the caller which uniquely maps to the stored element. The returned
> key can later be used in a very efficient lookup.
>
> Although the code and documentation are far from complete, the
> implementation in the repo is functional and hopefully serves as a
> basis for further work.

How is it different from having an iterator or a pointer to the inserted
element?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk