nmod_mat_randpermdiag
Synopsis
#include <flint/nmod_mat.h>int nmod_mat_randpermdiag(nmod_mat_t mat, flint_rand_t state, nn_srcptr diag, slong n)sourceSets mat to where is the matrix with (the entries of diag) on the main diagonal and zeros elsewhere, and and are random permutation matrices. Requires the number of rows and of columns. Returns the parity (0 for even, 1 for odd) of the two permutations combined.
Cite this page
The FLINT team, “nmod_mat_randpermdiag (nmod_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_mat/nmod_mat_randpermdiag.html (generated 2026-11-02).
@misc{flint-doc-nmod-mat-nmod-mat-randpermdiag,
author = {{The FLINT team}},
title = {{nmod\_mat\_randpermdiag (nmod\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod_mat/nmod_mat_randpermdiag.html},
note = {Generated 2026-11-02}
}