FLINT3.7.0-dev

_gr_vec_sort, gr_vec_sort

Synopsis#include <flint/gr_vec.h>
int _gr_vec_sort(gr_ptr vec, slong len, gr_ctx_t ctx)source
int gr_vec_sort(gr_vec_t dest, const gr_vec_t src, gr_ctx_t ctx)source

Sort the entries in increasing order with respect to gr_cmp. _gr_vec_sort works in place. If a comparison fails, the two entries are treated as equal and the failure is returned; the array is then a permutation of the input but may not be sorted.

Cite this page

The FLINT team, “_gr_vec_sort, gr_vec_sort (gr_vec.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_vec/_gr_vec_sort.html (generated 2026-10-20).