Macaulay2 Engine
Loading...
Searching...
No Matches
f4-computation.hpp
Go to the documentation of this file.
1/* Copyright 2005 - 2021, Michael E. Stillman */
2
3#ifndef _F4Computation_h_
4#define _F4Computation_h_
5
43
44#include "comp-gb.hpp" // for GBComputation
45#include "interface/m2-types.h" // for M2_bool, M2_arrayint
46#include "f4/f4.hpp" // for F4GB
47#include "interface/computation.h" // for ComputationStatusCode
48#include "polyring.hpp" // for PolynomialRing
49class Computation;
50class FreeModule;
51class Matrix;
52class MonomialInfo;
53class RingElement;
55class buffer;
56
73{
74 // Interface to the F4 linear algebra GB computation
75 // Handles: translation of polynomials to/from the correct form
76 // different possible template instantiations
77
79 const FreeModule * mFreeModule; // determines whether the monomial order is a
80 // Schreyer order.
81 // Also determines degrees of elements in F.
85 public:
87 const Matrix *m,
88 M2_bool collect_syz,
89 int n_rows_to_keep,
90 M2_arrayint gb_weights,
91 int strategy,
92 M2_bool use_max_degree,
93 int max_degree,
94 int numThreads);
95
96 ~F4Computation() override;
97
98 void remove_gb() override { delete mF4GB; }
99
101
102 bool stop_conditions_ok() override { return true; }
103
104 void start_computation() override;
105
106 const PolynomialRing *get_ring() const override { return mOriginalRing; }
107
108 Computation /* or null */ *set_hilbert_function(const RingElement *h) override;
109
110 const Matrix /* or null */ *get_gb() override;
111
112 const Matrix /* or null */ *get_mingens() override;
113
114 const Matrix /* or null */ *get_change() override;
115
116 const Matrix /* or null */ *get_syzygies() override;
117
118 const Matrix /* or null */ *get_initial(int nparts) override;
119
120 const Matrix /* or null */ *matrix_remainder(const Matrix *m) override;
121
122 M2_bool matrix_lift(const Matrix *m,
123 const Matrix /* or null */ **result_remainder,
124 const Matrix /* or null */ **result_quotient) override;
125
126 int contains(const Matrix *m) override;
127
128 void text_out(buffer &o) const override;
129 /* This displays statistical information, and depends on the
130 M2_gbTrace value */
131
132 int complete_thru_degree() const override;
133 // The computation is complete up through this degree.
134
135 void show() const override; // debug display
136};
137
139 M2_bool collect_syz,
140 int n_rows_to_keep,
141 M2_arrayint gb_weights,
142 int strategy,
143 M2_bool use_max_degree,
144 int max_degree,
145 int numThreads);
146
147#endif
148
149// Local Variables:
150// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
151// indent-tabs-mode: nil
152// End:
Abstract base for long-running, resumable engine computations (GBComputation, ResolutionComputation,...
Definition comp.hpp:70
bool stop_conditions_ok() override
const PolynomialRing * mOriginalRing
void start_computation() override
const VectorArithmetic * mVectorArithmetic
int contains(const Matrix *m) override
const FreeModule * mFreeModule
M2_bool matrix_lift(const Matrix *m, const Matrix **result_remainder, const Matrix **result_quotient) override
const PolynomialRing * get_ring() const override
int complete_thru_degree() const override
MonomialInfo * mMonoid
const Matrix * get_gb() override
enum ComputationStatusCode computation_is_complete()
const Matrix * get_change() override
void show() const override
const Matrix * matrix_remainder(const Matrix *m) override
const Matrix * get_initial(int nparts) override
void remove_gb() override
Computation * set_hilbert_function(const RingElement *h) override
~F4Computation() override
F4Computation(const VectorArithmetic *VA, 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)
const Matrix * get_mingens() override
const Matrix * get_syzygies() override
void text_out(buffer &o) const override
Commutative F4 Groebner-basis driver: degree-by-degree Macaulay matrix construction plus row-reductio...
Definition f4.hpp:154
Engine-side free module R^n over a Ring.
Definition freemod.hpp:66
base class for Groebner basis computations.
Definition comp-gb.hpp:69
Per-ring monomial layout / encoding helper used by F4GB.
Definition moninfo.hpp:108
Abstract base for the engine's polynomial-ring hierarchy.
Definition polyring.hpp:96
Front-end-visible "ring element" value: an engine ring_elem paired with the Ring* that gives it meani...
Definition relem.hpp:67
Runtime dispatcher that hides the concrete coefficient ring behind a std::variant of ConcreteVectorAr...
GBComputation — abstract base of every Groebner-basis algorithm in the engine.
ComputationStatusCode
Definition computation.h:53
ComputationStatusCode / StopConditions / StrategyValues / Algorithms / gbTraceValues — engine-to-inte...
GBComputation * createF4GB(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)
F4GB — the inner-loop Faugère F4 Groebner-basis algorithm.
#define Matrix
Definition factory.cpp:14
char M2_bool
Definition m2-types.h:82
Engine-to-interpreter type vocabulary across the C++ / .dd boundary.
PolynomialRing — abstract polynomial-ring base, the engine's most-reused class.