[Overview][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Hash class
Source position: contnrs.pp line 360
type TFPCustomHashTable = class(TObject) end; |
||
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. |
property HashFunction: THashFunction; [rw] |
|
Hash function currently in use |
|
Number of items in the hash table. |
|
property HashTableSize: LongWord; [rw] |
|
Size of the hash table |
property HashTable: TFPObjectList; [r] |
|
Hash table instance |
|
Number of empty slots in the hash table. |
|
property LoadFactor: Double; [r] |
|
Fraction of count versus size |
property AVGChainLen: Double; [r] |
|
Average chain length |
property MaxChainLength: LongWord; [r] |
|
Maximum chain length |
property NumberOfCollisions: LongWord; [r] |
|
Number of extra items |
|
Number of filled slots |
|
|
Hash class |
|
| | ||
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.
|
Single item in the hash table. |
|
|
TFPList descendent which manages objects. |
|
|
Standard hash value calculating function. |