[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'contnrs' (#fcl)

TFPCustomHashTable

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Hash class

Declaration

Source position: contnrs.pp line 352

type TFPCustomHashTable = class(TObject)

public

  constructor Create;

  

Instantiate a new TFPCustomHashTable instance using the default hash mechanism

  constructor CreateWith();

  

Instantiate a new TFPCustomHashTable instance with given algorithm and size

  destructor Destroy; override;

  

Free the hash table.

  procedure ChangeTableSize(); virtual;

  

Change the table size of the hash table.

  procedure Clear; virtual;

  

Clear the hash table.

  procedure Delete(); virtual;

  

Delete a key from the hash list.

  function Find();

  

Search for an item with a certain key value.

  function IsEmpty;

  

Check if the hash table is empty.

  HashFunction: THashFunction;

  

Hash function currently in use

  Count: LongWord;

  

Number of items in the hash table.

  HashTableSize: LongWord;

  

Size of the hash table

  HashTable: TFPObjectList;

  

Hash table instance

  VoidSlots: LongWord;

  

Number of empty slots in the hash table.

  LoadFactor: Double;

  

Fraction of count versus size

  AVGChainLen: Double;

  

Average chain length

  MaxChainLength: LongWord;

  

Maximum chain length

  NumberOfCollisions: LongWord;

  

Number of extra items

  Density: LongWord;

  

Number of filled slots

end;

Inheritance

TFPCustomHashTable

  

Hash class

|

TObject

Description

TFPCustomHashTable is a general-purpose hashing class. It can store string keys and pointers associated with these strings. The hash mechanism is configurable and can be optionally be specified when a new instance of the class is created; A default hash mechanism is implemented in RSHash.

A TFPHasList should be used when fast lookup of data based on some key is required. The other container objects only offer linear search methods, while the hash list offers faster search mechanisms.

See also

THTCustomNode

  

Single item in the hash table.

TFPObjectList

  

TFPList descendent which manages objects.

RSHash

  

Standard hash value calculating function.


Documentation generated on: Oct 27 2012