[fpc-pascal] FGL.TFPSList Find method needed (binary search)
Sven Barth
pascaldragon at googlemail.com
Sun Feb 17 02:20:47 CET 2019
Am Sa., 16. Feb. 2019, 21:30 hat AlexeyT <aaa5500 at ya.ru> geschrieben:
> Hello. Can you pls, add Sorted property to TFPSList / TFPGList (Add()
> method must sort newly added item), and also Find method (which must use
> binary search in Sorted case, and use plain loop if not sorted)
>
You could also check whether rtl-generics already provides what you need.
Just in case anyone wants to add this (I won't): this also requires
properties for a comparer and a compare algorithm (essentially the
arguments to Sort) as TFPGList<> should not require the presence of a
comparison operator in the generic parameter type.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190217/9e795887/attachment.html>
More information about the fpc-pascal
mailing list