libgdx/libgdx — pull request #733 by jrenner (2013-09-16 11:46:47+00:00)
Title: Quickselect (find Nth ordered statistic in mostly linear time)

Select class - mimics the structure of Sort class, allowing other algorithms to be implemented later without breaking the API

QuickSelect - implementation of Hoare's quick select.

See also the commit with tests if you want to run tests to verify correctness. I passed all the tests when I ran and I also dropped the new gdx.jar into my game where I used it to find the nearest enemy units (no bugs). In fact I mostly made this because finding new enemy targets based on distance was taking up a lot of cpu time in my game.

Eager for criticisms and suggestions.