gr_mat_randpermdiag
Synopsis
#include <flint/gr_mat.h>int gr_mat_randpermdiag(int * parity, gr_mat_t mat, flint_rand_t state, gr_ptr diag, slong n, gr_ctx_t ctx)sourceSets mat to a random row and column permutation of the diagonal matrix whose first n diagonal entries are given by the vector diag, writing the parity (0 or 1) of the permutation to parity. Returns GR_DOMAIN if the diagonal of mat is shorter than n.
Cite this page
The FLINT team, “gr_mat_randpermdiag (gr_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_mat/gr_mat_randpermdiag.html (generated 2026-10-20).
@misc{flint-doc-gr-mat-gr-mat-randpermdiag,
author = {{The FLINT team}},
title = {{gr\_mat\_randpermdiag (gr\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_mat/gr_mat_randpermdiag.html},
note = {Generated 2026-10-20}
}