Loïc Grenié on Mon, 12 May 2025 08:32:56 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: question on compare functions for the vecsort command |
Hello:
Suppose we have a small vector composed of 4 component vectors, say
V = [ [1,7,5,2], [3,7,1,4], [2,0,6,9], [8,0,5,1], etc...]
What is the compare function for vecsort(V, compare_function, flag) so
that I can
1. sort the 2nd column by ascending size, then sort the 3rd column by
descending size?
2. add the 3rd column to the 4th column, if the 2nd column > 1st column?