Replacing std::sort with sort_index from Armadillo C++ library

Published --