FLINT3.7.0-dev

nmod_mat_window_init

Synopsis#include <flint/nmod_mat.h>
void nmod_mat_window_init(nmod_mat_t window, const nmod_mat_t mat, slong r1, slong c1, slong r2, slong c2)source

Initialises window as the submatrix of mat formed by rows r_1 to r_2 - 1 and columns c_1 to c_2 - 1, where 0 \le r_1 \le r_2 \le mat->r and 0 \le c_1 \le c_2 \le mat->c. The window shares its entries with mat, so writing to one changes the other.

No memory is allocated. The window has the stride and modulus of mat and can be passed to any function that takes an nmod_mat_t, as input or output, as long as no two arguments overlap partially. The bounds are only checked by FLINT_ASSERT. A window must not be passed to nmod_mat_clear or nmod_mat_swap.

Guides#

Cite this page

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