Open Reptorian1125 opened 4 days ago
Recently I had to do this:
ref_vector=shift(ref_vector,-1,2); ref_vector=sort(ref_vector,1,whds,2);
Currently, sort always use the first indice of element to sort. I would like to use n-th indice of element to sort instead.
Now, we have this:
sort(X,_is_increasing,_nb_elts,_size_elt) (sorted values)
With offset as a optional argument next to size_elt, the new code becomes:
ref_vector=sort(ref_vector,1,whds,2,1);
So, it's using every second indice of element for sorting.
That's a good idea. https://github.com/GreycLab/CImg/commit/f20e9dd20102ab9db6a0fe8e9273b06a5fc431e3 implements this feature.
Recently I had to do this:
Currently, sort always use the first indice of element to sort. I would like to use n-th indice of element to sort instead.
Now, we have this:
With offset as a optional argument next to size_elt, the new code becomes:
So, it's using every second indice of element for sorting.