fmpz_mat_randrank
Synopsis
#include <flint/fmpz_mat.h>void fmpz_mat_randrank(fmpz_mat_t mat, flint_rand_t state, slong rank, flint_bitcnt_t bits)sourceSets mat to a random sparse matrix of the given rank, with exactly rank nonzero entries, random integers of at most bits bits, in distinct rows and columns. Throws if rank exceeds the number of rows or columns. fmpz_mat_randops turns it into a dense matrix of the same rank.
Cite this page
The FLINT team, “fmpz_mat_randrank (fmpz_mat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mat/fmpz_mat_randrank.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mat-fmpz-mat-randrank,
author = {{The FLINT team}},
title = {{fmpz\_mat\_randrank (fmpz\_mat.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mat/fmpz_mat_randrank.html},
note = {Generated 2026-10-20}
}