Function: vecsort
Section: linear_algebra
C-Name: vecsort0
Prototype: GDGD0,L,
Help: vecsort(x,{k},{flag=0}): sorts the vector of vectors (or matrix) x in
 ascending order, according to the value of its k-th component if k is not
 omitted. Binary digits of flag (if present) mean: 1: indirect sorting,
 return the permutation instead of the permuted vector, 2: sort using
 lexicographic order, 4: use descending instead of ascending order
Description: 
 (vec):vec	sort($1)
 (vec, gen):vec	vecsort0($1, $2, 0)
 (vec, , 0):vec	sort($1)
 (vec, , 1):vec	indexsort($1)
 (vec, , 2):vec	lexsort($1)
 (vec, , small):vec	vecsort0($1, NULL, $3)
 (vec, gen, small):vec	vecsort0($1, $2, $3)

