1 #ifndef __F4_REDUCTION_HPP__ 2 #define __F4_REDUCTION_HPP__ 21 #include "system_constants.hpp" 24 #include "monomial.hpp" 25 #include "monomial_ordering.hpp" 26 #include "polynomial.hpp" 27 #include "critical_pair.hpp" 45 list<Constant_Polynomial *>
f4_control(
const list<Abstract_Polynomial *> &F);
65 const list<Critical_Pair_Basic *> & P,
66 const list<Abstract_Polynomial *> & B
90 list<Monomial *>::iterator & ti,
91 list<Abstract_Polynomial *>::iterator & ri,
126 vector<Constant_Polynomial *>
finalize();
164 vector<Monomial *>
M;
172 vector<Abstract_Polynomial *>
R;
174 const list<Abstract_Polynomial *> &
G;
The general class of a polynomial.
unsigned rows
number of rows in the polynomial
vector< Monomial * > M
monomials for each column
bool is_zero()
returns true iff all the entries are 0
vector< Abstract_Polynomial * > R
finalized list of indices of reducers for the corresponding monomials of f
list< Monomial * > M_build
monomials while building
void print_matrix(bool show_data=false)
prints the matrix
vector< Poly_Sugar_Data * > strategies
strategy data for each polynomial
void reduce_my_rows(const set< unsigned > &)
reduces the specified set of rows, suitable for multithreading
void advance_head(unsigned i)
advances head; useful after a computation
list< Abstract_Polynomial * > R_build
indices of reducers for the corresponding elements of M
void reduce_by_old()
reduces polynomials
void clear_strategy(unsigned i)
clears the strategy; do this if you have saved it elsewhere
~F4_Reduction_Data()
releases space for the matrix and deletes any strategies not already set to nullptr ...
vector< Constant_Polynomial * > finalize()
converts this to a Constant_Polynomial and returns the result
unsigned cols
number of columns in the polynomial
Implementation of monomials.
Element of a field of prime characteristic.
interface to a monomial ordering
F4_Reduction_Data(const list< Critical_Pair_Basic *> &P, const list< Abstract_Polynomial *> &B)
encapsulation of one step of the F4 algorithm for the polynomials indicated by P and B ...
Encapsulates information about a polynomial ring for easy access: ground field, number of indetermina...
const Monomial_Ordering * mord
how the monomials are ordered
void add_monomials(list< Monomial *>::iterator &ti, list< Abstract_Polynomial *>::iterator &ri, const Abstract_Polynomial *g, const Monomial &u, bool new_row=false)
adds monomials of to M_build
void initialize_many(const list< Critical_Pair_Basic *> &P)
creates the matrix
void list_reducers()
lists the reducers selected for each column, in order
list< Constant_Polynomial * > f4_control(const list< Abstract_Polynomial *> &F)
equivalent to buchberger(), but for Faugère’s F4 algorithm
void reduce_by_new()
reduces polynomials
Implementation of Faugère’s F4 algorithm.
Prime_Field_Element * A
coefficient data
Polynomial_Ring & Rx
polynomial ring
vector< Poly_Sugar_Data * > get_strategies()
returns the strategy currently in use
vector< unsigned > nonzero_entries
number of nonzero entries of each row of A
vector< unsigned > heads
head of the polynomial (location of leading term)
const list< Abstract_Polynomial * > & G
current basis of ideal