[Overview][Constants][Types][Classes][Procedures and functions] | Reference for unit 'contnrs' (#fcl) |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Hash class
Source position: contnrs.pp line 350
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. |
property HashFunction: THashFunction; [rw] |
|
Hash function currently in use |
property Count: LongWord; [r] |
|
Number of items in the hash table. |
property HashTableSize: LongWord; [rw] |
|
Size of the hash table |
property HashTable: TFPObjectList; [r] |
|
Hash table instance |
property VoidSlots: LongWord; [r] |
|
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 |
property Density: LongWord; [r] |
|
Number of filled slots |
end; |
|
Hash class |
|
| | ||
TObject |
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. |
No notes exist for this page yet.