FLINT3.7.0-dev

gr_mat_mul_diag, gr_mat_diag_mul

Synopsis#include <flint/gr_mat.h>
int gr_mat_mul_diag(gr_mat_t res, const gr_mat_t A, const gr_vec_t D, gr_ctx_t ctx)source
int gr_mat_diag_mul(gr_mat_t res, const gr_vec_t D, const gr_mat_t A, gr_ctx_t ctx)source

Set res to AD or DA, where D is the diagonal matrix with the entries of the vector D on its diagonal: column j (row i) of A is multiplied by D_j (D_i).

Cite this page

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