generics.collectionsUnits Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers |
Class TDeamortizedDArrayCuckooMap
Unit
Generics.Collections
Declaration
type TDeamortizedDArrayCuckooMap<TKey,TValue,THashFactory,TCuckooCfg> = class(TCustomDictionary<TKey,TValue,THashFactory>)
Description
more info : http://arxiv.org/abs/0903.0391
Hierarchy
Overview
Internal Classes and Records
 |
TCDM = class(TOpenAddressingSH<TKey,TEmptyRecord,TDefaultHashFactory,TLinearProbing>) |
 |
TItem = record |
 |
TKeyCollection = class(TDictionaryEnumerable<TKeyEnumerator,TPKeyEnumerator,TKey,TKey,TValue,THashFactory>) |
 |
TKeyEnumerator = class(TDeamortizedDArrayCuckooMapEnumerator<TKey,TKey,TValue,THashFactory,TCuckooCfg>) |
 |
TPairEnumerator = class(TDeamortizedDArrayCuckooMapEnumerator<TDictionaryPair,TKey,TValue,THashFactory,TCuckooCfg>) |
 |
TPKeyEnumerator = class(TDeamortizedDArrayCuckooMapEnumerator<PKey,TKey,TValue,THashFactory,TCuckooCfg>) |
 |
TPointersEnumerator = class(TDeamortizedDArrayPointersEnumerator<TCuckooCfg,TItemsArray,TItemsDArray,TQueueDictionary,PDictionaryPair>) |
 |
TPValueEnumerator = class(TDeamortizedDArrayCuckooMapEnumerator<PValue,TKey,TValue,THashFactory,TCuckooCfg>) |
 |
TQueueDictionary = class(TOpenAddressingLP<TKey,TValueForQueue,TDefaultHashFactory,TLinearProbing>) |
 |
TValueCollection = class(TDictionaryEnumerable<TValueEnumerator,TPValueEnumerator,TValue,TKey,TValue,THashFactory>) |
 |
TValueEnumerator = class(TDeamortizedDArrayCuckooMapEnumerator<TValue,TKey,TValue,THashFactory,TCuckooCfg>) |
Internal Types
Fields
Methods
Properties
Description
Internal Types
 |
TItemsArray = array of TItem; |
|
 |
TItemsDArray = array[0..Pred(TCuckooCfg.D)] of TItemsArray; |
|
Fields
 |
internal const LR_NIL = -1; |
Lookup Result
|
 |
internal const LR_QUEUE = -2; |
|
 |
FCDM: TCDM; |
probably can be optimized - hash TItem give information from TItem.Hash for cuckoo ... currently is kept in "TQueueDictionary = class(TOpenAddressingSH<TKey, TItem, ...>"
|
 |
FItemsThreshold: SizeInt; |
cycle-detection mechanism
|
 |
var CUCKOO_SIGN: UInt32; |
class
|
 |
var CUCKOO_INDEX_SIZE: UInt32; |
class
|
 |
var CUCKOO_HASH_SIGN: UInt32; |
class
|
Methods
 |
procedure Resize(ANewSize: SizeInt); |
CUCKOO_MAX_ITEMS_LENGTH: <- to do : calc max length for items based on CUCKOO sign maybe some CDM bloom filter?
|
 |
procedure Rehash(ASizePow2: SizeInt); |
|
 |
procedure PrepareAddingItem; |
|
 |
procedure UpdateItemsThreshold(ASize: SizeInt); override; |
|
 |
function Lookup(constref AKey: TKey; var AHashListOrIndex: PUInt32): SizeInt; inline; overload; |
|
 |
function Lookup(constref AItems: TItemsDArray; constref AKey: TKey; var AHashListOrIndex: PUInt32): SizeInt; virtual; overload; |
|
 |
function GetEnumerator: TPairEnumerator; reintroduce; |
bug #24283 - workaround related to lack of DoGetEnumerator
|
 |
function GetItem(const AKey: TKey): TValue; inline; |
|
 |
procedure SetItem(const AKey: TKey; const AValue: TValue); overload; inline; |
|
 |
procedure SetItem(constref AValue: TValue; const AHashListOrIndex: PUInt32; ALookupResult: SizeInt); overload; |
|
 |
procedure AddItem(constref AItems: TItemsDArray; constref AKey: TKey; constref AValue: TValue; const AHashList: PUInt32); overload; |
|
 |
procedure DoAdd(const AKey: TKey; const AValue: TValue; const AHashList: PUInt32); overload; inline; |
|
 |
function DoRemove(const AHashListOrIndex: PUInt32; ALookupResult: SizeInt; ACollectionNotification: TCollectionNotification): TValue; |
|
 |
function GetQueueCount: SizeInt; |
|
 |
procedure SetCapacity(ACapacity: SizeInt); override; |
|
 |
procedure SetMaxLoadFactor(AValue: single); override; |
|
 |
function GetLoadFactor: single; override; |
|
 |
function GetCapacity: SizeInt; override; |
|
 |
constructor Create; override; overload; |
TODO: function TryFlushQueue(ACount: SizeInt): SizeInt;
|
 |
constructor Create(ACapacity: SizeInt); override; overload; |
|
 |
constructor Create(ACapacity: SizeInt; const AComparer: IExtendedEqualityComparer<TKey>); virtual; overload; |
|
 |
constructor Create(const AComparer: IExtendedEqualityComparer<TKey>); overload; |
|
 |
constructor Create(ACollection: TEnumerable<TDictionaryPair>; const AComparer: IExtendedEqualityComparer<TKey>); virtual; overload; |
|
 |
destructor Destroy; override; |
|
 |
procedure Add(constref APair: TPair<TKey, TValue>); override; overload; |
|
 |
procedure Add(constref AKey: TKey; constref AValue: TValue); overload; |
|
 |
procedure Remove(constref AKey: TKey); |
|
 |
function ExtractPair(constref AKey: TKey): TPair<TKey, TValue>; |
|
 |
procedure Clear; override; |
|
 |
procedure TrimExcess; |
|
 |
function TryGetValue(constref AKey: TKey; out AValue: TValue): Boolean; |
|
 |
procedure AddOrSetValue(constref AKey: TKey; constref AValue: TValue); |
|
 |
function ContainsKey(constref AKey: TKey): Boolean; inline; |
|
 |
function ContainsValue(constref AValue: TValue): Boolean; overload; |
|
 |
function ContainsValue(constref AValue: TValue; const AEqualityComparer: IEqualityComparer<TValue>): Boolean; virtual; overload; |
|
Properties
Generated by PasDoc 0.15.0.
|