I have two vectors with same sizes
vector<float> predictions; //say {1.22, 3.22, 2.22, 4.22}
vector<int> indices; //say {0, 1, 2, 3}
I sorted the values in predictions in descending order using
std::sort(predictions.rbegin(), predictions.rend()); //gives {4.22, 3.22, 2.22, 1.22}
Now I want to sort indices simultaneously with the predictions.
//to get {3, 1, 2, 0}
How do I do it without using boost and custom templates?