php-judy icon indicating copy to clipboard operation
php-judy copied to clipboard

sort

Open jeremyFreeAgent opened this issue 12 years ago • 2 comments

Hi,

Do you know how to sort a Judy array ? Using uasort and others...

When you insert data, the values are sorted by key whatever the order of insertion.

Regards

jeremyFreeAgent avatar Oct 16 '12 06:10 jeremyFreeAgent

I will have to take a look at this. Judy arrays are sorted by nature. I think I will need to come up with a different structure to answer this need with different sorting. I could probably do it easily by maintaining index in another Judy array.

orieg avatar Oct 28 '12 21:10 orieg

If Judy ignores the order of insertion, that migth be a very interesting feature, provided that this is consistent or "by design" and not just a side effect!

patrickallaert avatar Aug 17 '15 18:08 patrickallaert