As part of an experiment with genetic learning algorithms, it would be useful to be able to sort an entire array of 'genes' into fitness order. So far the only answers I can find in the community deal with the highest, or second highest values and so forth.
Has anyone developed a robust array sorting method that could be implemented in C++? It seems a lot of implementation involve the ( int i : array) method which is not universally accepted by all C++ platforms.
I would be grateful for any assistance.
std::sortperhaps ?std::sort(std::begin(arr), std::end(arr));.