Macaulay2 Engine
Loading...
Searching...
No Matches
f4-m2-interface.hpp File Reference

F4toM2Interface — static translators between engine vec / Matrix and F4's GBF4Polynomial. More...

#include "interface/m2-types.h"
#include "f4/f4-types.hpp"
#include "ringelem.hpp"

Go to the source code of this file.

Classes

class  F4toM2Interface
 Static-method namespace for translating between engine Matrix / vec polynomials and the F4-internal GBF4Polynomial form. More...

Detailed Description

F4toM2Interface — static translators between engine vec / Matrix and F4's GBF4Polynomial.

Note
AI-generated documentation. Verify against the source before relying on it.

Declares the static-only F4toM2Interface namespace-class that converts each direction across the F4 boundary. Ingest side: from_M2_vec packs one engine vec into a single GBF4Polynomial, and from_M2_matrix walks the columns of an input Matrix and fills a gb_array of GBF4Polynomials for the F4 generator list. Egress side: to_M2_vec unpacks one GBF4Polynomial back into an engine vec, to_M2_matrix produces a Matrix from a gb_array (used by the GB extraction path), and to_M2_MutableMatrix reconstructs a MutableMatrix directly from a Macaulay coefficient_matrix plus the generator and basis arrays (used by the debug / introspection path). poly_set_degrees(VA, MI, wts, f, deg, alpha) reads the weight-vector degree deg and the homogenising degree alpha of a packed polynomial for sugar / degree tracking inside F4GB.

Every method threads through a VectorArithmetic * (the per-coefficient-ring fast path) and a MonomialInfo * (the F4 packed-monomial layout) so the helpers stay stateless. Both f4-computation.cpp (input ingestion + result vec extraction) and f4.cpp itself (per-element vec extraction during basis output and MutableMatrix reconstruction) call into this interface.

See also
f4-computation.hpp
f4-types.hpp
moninfo.hpp

Definition in file f4-m2-interface.hpp.