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" 43 const list<Abstract_Polynomial *> &F,
46 WT_TYPE * strategy_weights
61 list<Abstract_Polynomial *> & B
64 const list<Critical_Pair_Basic *> & P,
65 const list<Abstract_Polynomial *> & B
81 list<Monomial *>::iterator * ti,
82 list<Abstract_Polynomial *>::iterator & ri,
91 void initialize_many(
const list<Critical_Pair_Basic *> & P);
132 void list_reducers();
149 vector<Abstract_Polynomial *>
R;
151 const list<Abstract_Polynomial *> &
G;
void advance_head()
advances head; useful after a computation
The general class of a polynomial.
Poly_Strategy_Data * get_strategy()
returns the strategy currently in use
A Constant_Polynomial is a polynomial that should not change.
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
unsigned len
length of the polynomial
list< Poly_Strategy_Data * > strategies
strategy data for each polynomial
polynomial-related strategy data
unsigned nonzero_entries
number of nonzero entries of A
vector< Constant_Polynomial * > finalize()
converts this to a Constant_Polynomial and returns the result
list< Monomial * > * M_build
monomials of f
StrategyFlags
flag indicating which strategy to use for computation
list< Abstract_Polynomial * > * R_build
indices of reducers for the corresponding elements of M
SPolyCreationFlags
flag indicating which structure to use for an s-polynomial
void reduce()
reduces polynomial
void initialize(Abstract_Polynomial *p, const Monomial &t)
copy temporary to permanent reducers; free list of monomials; insert p's coefficients, aligned with multiples of t
Implementation of monomials.
Element of a field of prime characteristic.
Monomial ** M
polynomial data
interface to a monomial ordering
Poly_Strategy_Data * strategy
strategy in use
Encapsulates information about a polynomial ring for easy access: ground field, number of indetermina...
list< Constant_Polynomial * > f4_control(const list< Abstract_Polynomial *> &F, SPolyCreationFlags method, StrategyFlags strategy, WT_TYPE *strategy_weights)
equivalent to buchberger(), but for Faugère’s F4 algorithm
void clear_strategy()
clears the strategy; do this if you have saved it elsewhere
const Monomial_Ordering * mord
how the monomials are ordered
Polynomial_Ring * Rx
polynomial ring
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
unsigned head
head of the polynomial (location of leading term)
Implementation of Faugère’s F4 algorithm.
Controls the creation of s-polynomials.
Prime_Field_Element * A
coefficient data
const list< Abstract_Polynomial * > & G
current basis of ideal