Found something useful, here:
http://dlang.org/phobos/std_algorithm_sorting.html#makeIndex

with that I can achieve the following
void main(){
        ku[] tt = [ku(2), ku(1)];
        //writeln(tt);
        auto index3 = new size_t[tt.length];
        makeIndex!("a.id < b.id")(tt, index3);
        //writeln(index3);
}

so my index3 contains the right permutation of the tt array.
What I still need is the possibility to take the values of the tt array in the order of the generated index. Can somebody give a hint how to achieve this?

Reply via email to