I wonder whether their is some algorithm in stl or in Qt that sorts an array of double and return the indices of sorted items in the original list. Eg. L = 1 , 2 , 5 , 3 L_sort = 1 , 2 , 3 , 5 Indices = 1, 2 , 4, 3
So that I can afterwards calculate AnotherList[Indices] (the same order prevails in both lists, with respect to the original list L).
In the end, I thought of creating a QList, each MyStruct containing two members, one of same type LType as elements in L, the other of same type AnotherType as elements in AnotherList. And then ordering with respect to members of type LType. However I have this idea, I don't know properly how to proceed in Qt.
Thanks and regards