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

F4ComputationGBComputation adapter around the F4 inner-loop engine. More...

#include "comp-gb.hpp"
#include "interface/m2-types.h"
#include "f4/f4.hpp"
#include "interface/computation.h"
#include "polyring.hpp"

Go to the source code of this file.

Classes

class  F4Computation
 GBComputation subclass that drives an F4GB engine instance from the engine-side computation API. More...

Functions

GBComputationcreateF4GB (const Matrix *m, M2_bool collect_syz, int n_rows_to_keep, M2_arrayint gb_weights, int strategy, M2_bool use_max_degree, int max_degree, int numThreads)

Detailed Description

F4ComputationGBComputation adapter around the F4 inner-loop engine.

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

Declares F4Computation, the GBComputation subclass the interpreter sees when F4 is selected. The class holds borrowed pointers to the user's PolynomialRing and FreeModule (the latter determines whether the order is Schreyer and the degrees of free-module generators), a VectorArithmetic* pinned at construction (the per-coefficient-ring fast path picked from the aring-zzp-ffpack.hpp / aring-zzp-flint.hpp / generic variants the engine has built), a MonomialInfo* describing the F4-specific packed monomial layout, and the owned F4GB* mF4GB instance that runs the actual algorithm (deleted in remove_gb). Coefficient-ring polymorphism is runtime through VectorArithmetic, not through F4GB template instantiation — F4GB is monomorphic.

Standard GBComputation virtuals (start_computation, get_gb, get_mingens, get_change, get_syzygies, get_initial, matrix_remainder, matrix_lift, contains, set_hilbert_function, complete_thru_degree) read state out of the running F4GB and re-wrap it as engine Matrix values; the vec <-> GBF4Polynomial translation is delegated to f4-m2-interface.hpp's F4toM2Interface. stop_conditions_ok() unconditionally returns true. The createF4GB(m, collect_syz, n_rows_to_keep, gb_weights, strategy, use_max_degree, max_degree, numThreads) free factory below is the actual entry point used by comp-gb.cpp when the algorithm strategy selects F4.

See also
f4.hpp
f4-m2-interface.hpp
comp-gb.hpp

Definition in file f4-computation.hpp.