[fpc-pascal] Hashmap for integers
Juha Manninen (gmail)
juha.manninen62 at gmail.com
Sun Aug 22 16:05:21 CEST 2010
Hi
Is there an implementation of a hash map where the keys are integers. It is
needed when the integers are too big for a lookup array.
I only need check the existence of keys so the data type is not important.
About like this:
var
Len: integer;
SeenLen: TIntMap; // or whatever the type is called
...
if not SeenLen.Has(Len) then begin
... work with Len ...
SeenLen[Len] := nil; // If the data type is pointer
end;
A related question:
What is the state of the generic containers now?
I want to use FPC 2.4.x features for this program and I will not experiment
with new development code now, but some time later I will.
Do the generic containers work equally well with primitive types like integer,
pointer and string, and then with TObject derivatives? I would guess the
primitive types are a challenge.
Regards,
Juha
More information about the fpc-pascal
mailing list