-
-
Save danlark1/8f4587e9cecc74dc778bcbd0c062037d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We only care about the n entities with the highest scores. | |
std::partial_sort(vector.begin(), | |
vector.begin() + n, | |
vector.end(), | |
HasHigherScore()); | |
vector.resize(n); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment