FLINT3.7.0-dev

fmpz_mod_mat_swap, fmpz_mod_mat_swap_entrywise

Synopsis#include <flint/fmpz_mod_mat.h>
void fmpz_mod_mat_swap(fmpz_mod_mat_t mat1, fmpz_mod_mat_t mat2, const fmpz_mod_ctx_t ctx)source
void fmpz_mod_mat_swap_entrywise(fmpz_mod_mat_t mat1, fmpz_mod_mat_t mat2, const fmpz_mod_ctx_t ctx)source

Swap two matrices. fmpz_mod_mat_swap swaps the structures in constant time; fmpz_mod_mat_swap_entrywise swaps the entries one by one, which also works for windows, and requires equal dimensions.

Cite this page

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