FLINT3.7.0-dev

gr_mpoly_swap, gr_mpoly_set_shallow

Synopsis#include <flint/gr_mpoly.h>
void gr_mpoly_swap(gr_mpoly_t A, gr_mpoly_t B, gr_mpoly_ctx_t ctx)source
void gr_mpoly_set_shallow(gr_mpoly_t res, const gr_mpoly_t poly, gr_mpoly_ctx_t ctx)source

Swap two polynomials in constant time, and make res a shallow copy of poly sharing its arrays (which must then not be cleared twice).

Cite this page

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