On Fri, 3 Apr 2009 17:16:50 +0200 Helmut Hartl <helmut.ha...@firmos.at> wrote:
> Von: Mattias Gaertner <nc-gaert...@netcologne.de> > Gesendet: Fr 03.04.2009 16:51 > An: fpc-pascal@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. Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal