FLINT3.7.0-dev

fmpz_mat_struct, fmpz_mat_t

Synopsis#include <flint/fmpz_mat.h>
fmpz_mat_struct
fmpz_mat_t

An fmpz_mat_struct has the fields entries (a pointer to the entry in row 0, column 0), r and c (the numbers of rows and columns) and stride (the distance, in entries, between the starts of consecutive rows). An fmpz_mat_t is an array of one fmpz_mat_struct, so that it is passed by reference.

Entry (i, j) is entries[i * stride + j]. A matrix created by fmpz_mat_init owns rc entries with stride equal to c; a window created by fmpz_mat_window_init points into another matrix and has that matrix's stride. Code that accesses entries directly must therefore use fmpz_mat_entry or fmpz_mat_row rather than assume contiguous storage.

Guides#

Cite this page

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