[fpc-pascal] "Generics" Red Black Tree for fpc
nc-gaertnma at netcologne.de
Fri Apr 3 18:07:33 CEST 2009
On Fri, 3 Apr 2009 17:16:50 +0200
Helmut Hartl <helmut.hartl at firmos.at> wrote:
> Von: Mattias Gaertner <nc-gaertnma at netcologne.de>
> Gesendet: Fr 03.04.2009 16:51
> An: fpc-pascal at lists.freepascal.org;
> Betreff: Re: [fpc-pascal] "Generics" Red Black Tree for fpc
> > How much work do you think is it to extend it to accept duplicate
> > keys? Mattias
> How probable are duplicate keys in your usecase? / what is the use
> case ? It would be easy to add them as list per key node natively,
> but that would be possible with the current version too if you use a
> listtype as the storage type ...
Of course duplicates are very unlikely, but chance is not 0. Approx 80%
of my trees must therefore support duplicates.
Using lists in the nodes would cost speed and memory (duplicates are
seldom), so I would prefer a more direct support.
More information about the fpc-pascal