bridge/class-master/depend/pari/src/basemath/mftrace.c
/* sort t_VEC of vector spaces by increasing dimension */
sort t_VEC of vector spaces by increasing dimension
sort t_VEC of vector spaces by increasing dimension
static GEN
sort_by_dim(GEN v)
{
  long i, l = lg(v);
  GEN D = cgetg(l, t_VECSMALL);
  for (i = 1; i < l; i++) D[i] = lg(gmael(v,i,2));
  return vecpermute(v , vecsmall_indexsort(D));
}
static GEN sort_by_dim ( GEN v ) { long i , l = lg ( v ) ; GEN D = cgetg ( l , t_VECSMALL ) ; for ( i = 1 ; i < l ; i ++ ) D [ i ] = lg ( gmael ( v , i , 2 ) ) ; return vecpermute ( v , vecsmall_indexsort ( D ) ) ; }
sort t_VEC of vector spaces by increasing dimension
sort t_VEC of vector spaces by increasing dimension