FLINT3.7.0-dev

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)source

Sets 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).