X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=cds%2Fcontainer%2Fcuckoo_map.h;h=d8dc233ac9c020f7cde6b001d0729c86b3cdfce1;hb=f31988b031453d7fdf7fe212f966554fa558af3e;hp=6423e16140a05f1b83923eb4623c2c73d77cfcbc;hpb=cd515d6402be81b84e2eb0c9d4cf0a1ca9e4d95a;p=libcds.git diff --git a/cds/container/cuckoo_map.h b/cds/container/cuckoo_map.h index 6423e161..d8dc233a 100644 --- a/cds/container/cuckoo_map.h +++ b/cds/container/cuckoo_map.h @@ -122,7 +122,7 @@ namespace cds { namespace container { About Cuckoo hashing [From "The Art of Multiprocessor Programming"] - Cuckoo hashing is a hashing algorithm in which a newly added item displaces any earlier item + Cuckoo hashing is a hashing algorithm in which a newly added item displaces any earlier item occupying the same slot. For brevity, a table is a k-entry array of items. For a hash set f size N = 2k we use a two-entry array of tables, and two independent hash functions, h0, h1: KeyRange -> 0,...,k-1 @@ -160,14 +160,14 @@ namespace cds { namespace container { the average search complexity is O(PROBE_SET/2). However, the overhead of sorting can eliminate a gain of ordered search. - The probe set is ordered if opt::compare or opt::less is specified in \p %CuckooSet - declaration. Otherwise, the probe set is unordered and \p %CuckooSet must contain - opt::equal_to option. + The probe set is ordered if \p compare or \p less is specified in \p Traits + template parameter. Otherwise, the probe set is unordered and \p Traits must contain + \p equal_to predicate. Template arguments: - \p Key - key type - \p T - the type stored in the map. - - \p Traits - map traits., default is \p cuckoo::traits. + - \p Traits - map traits, default is \p cuckoo::traits. It is possible to declare option-based set with \p cuckoo::make_traits metafunction result as \p Traits template argument. @@ -526,7 +526,7 @@ namespace cds { namespace container { - \p bNew - \p true if the item has been inserted, \p false otherwise - \p item - an item of the map for \p key - Returns std::pair where \p first is \p true if operation is successfull, + Returns std::pair where \p first is \p true if operation is successful, i.e. the node has been inserted or updated, \p second is \p true if new item has been added or \p false if the item with \p key already exists.