[fpc-pascal] Hashmap for integers
aksdb at gmx.de
Sun Aug 22 16:34:55 CEST 2010
On Sun, 22 Aug 2010 17:05:21 +0300, "Juha Manninen (gmail)"
<juha.manninen62 at gmail.com> wrote:
> Is there an implementation of a hash map where the keys are integers. It
> 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
> About like this:
TIntMap = specialize TFPGMap<Integer, Integer>; //Maps Int --> Int
> 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
> A related question:
> What is the state of the generic containers now?
FPC 2.4.x should be fine with generics, although 2.5 is still more
advanced in that sector.
More information about the fpc-pascal