I need an argsort in my c++ code. I see some people write their own argsort in C++ like this one https://medium.com/@sddkal/my-take-on-c-argsort-function-bfb59845d30c. But what would be a built-in one or one from a well-known library? Implementations from such libraries should have better performance presumably (like std::vector should have better performance than a hand-crafted one.)
Argsort is to returns a list of index positions as if our target list is sorted. See https://numpy.org/doc/stable/reference/generated/numpy.argsort.html for a description in python's implementation in Numpy for example.