I'm providing a header file that defines two functions for ranking values stored either in an iterable container or simply in a plain array. If you want to rank N values, make sure your "rank" array is of size N too! The trick is merely to exploit the third input of std::sort :)
No comments:
Post a Comment