FLINT3.7.0-dev

gr_mat_set, gr_mat_set_fmpz_mat, gr_mat_set_fmpq_mat, gr_mat_set_gr_mat_other

Synopsis#include <flint/gr_mat.h>
int gr_mat_set(gr_mat_t res, const gr_mat_t mat, gr_ctx_t ctx)source
int gr_mat_set_fmpz_mat(gr_mat_t res, const fmpz_mat_t mat, gr_ctx_t ctx)source
int gr_mat_set_fmpq_mat(gr_mat_t res, const fmpq_mat_t mat, gr_ctx_t ctx)source
int gr_mat_set_gr_mat_other(gr_mat_t res, const gr_mat_t mat, gr_ctx_t mat_ctx, gr_ctx_t ctx)source

Set res to a copy of mat, converting the entries from integers, rationals or the ring mat_ctx into R. A conversion that is not possible gives GR_DOMAIN or GR_UNABLE. The shapes must agree.

Cite this page

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