Opencv sort vs sortIdx

hi, what is diffrence bettwen this 2 function?
cv::sort vs cv::sortIdx

Instead of reordering the elements themselves, it stores the indices of sorted elements in the output array. For example: […]