Gröbner basis project
Codebase for research into Gröbner basis computation
|
Controls the creation of s-polynomials, specialized for the dynamic algorithm. More...
#include <critical_pair.hpp>
Public Member Functions | |
Construction | |
Critical_Pair_Dynamic (Abstract_Polynomial *f, unsigned strategy, Weighted_Ordering *how_to_order) | |
create critical pair (f,0) for initial polynomial, with given ordering | |
Critical_Pair_Dynamic (Abstract_Polynomial *f, Abstract_Polynomial *g, unsigned strategy, Weighted_Ordering *how_to_order) | |
create critical pair (f,g) for two polynomials, with given ordering | |
Computation | |
virtual Mutable_Polynomial * | s_polynomial (SPolyCreationFlags method, int strategy) |
creates the s-polynomial for first() and second() More... | |
Basic properties | |
Weighted_Ordering * | how_ordered () const |
the ordering associated with this pair | |
Modification | |
void | change_ordering (Weighted_Ordering *new_order) |
change the ordering associated with this pair More... | |
![]() | |
Critical_Pair_Basic (Abstract_Polynomial *f, unsigned strategy) | |
create critical pair (f,0) for initial polynomial | |
Critical_Pair_Basic (Abstract_Polynomial *f, Abstract_Polynomial *g, unsigned strategy) | |
create critical pair (f,g) for two polynomials | |
virtual | ~Critical_Pair_Basic () |
bool | is_generator () const |
whether this pair is from a generator | |
const Abstract_Polynomial * | first () const |
first polynomial in pair | |
const Abstract_Polynomial * | second () const |
second polynomial in pair | |
const Monomial & | lcm () const |
lcm of leading monomials of polynomials | |
unsigned | lcm_degree (unsigned i) const |
degree of ith variable in lcm | |
const Monomial & | first_multiplier () const |
monomial needed to multiply first polynomial to lcm() | |
const Monomial & | second_multiplier () const |
monomial needed to multiply second polynomial to lcm() | |
const Pair_Strategy_Data * | pair_key () const |
strategy used for comparison of pairs | |
virtual Mutable_Polynomial * | s_polynomial () |
to use only if s-polynomial is already computed by another method More... | |
virtual void | set_spoly (Mutable_Polynomial *p) |
sets the s-polynomial to p , for explorer methods | |
Protected Attributes | |
Weighted_Ordering * | ordering |
the Monomial_Ordering assigned to this pair — might disagree with that of polynomials; they must be updated immediately if this is a generator; otherwise, update can wait until the critical pair is computed. | |
![]() | |
Pair_Strategy_Data * | key = nullptr |
strategy used to sort critical pairs | |
Abstract_Polynomial * | p |
first polynomial in the critical pair | |
Abstract_Polynomial * | q |
second polynomial in the critical pair | |
Mutable_Polynomial * | s |
S-polynomial. | |
Monomial | tp |
monomial multiple of \(p\) that produces \(S\)-polynomial | |
Monomial | tpq |
lcm of leading monomials of \(p\) and \(q\) | |
Monomial | tq |
monomial multiple of \(q\) that produces \(S\)-polynomial | |
Friends | |
I/O | |
ostream & | operator<< (ostream &, const Critical_Pair_Dynamic &) |
outputs the pair, and the ordering | |
I/O |
Controls the creation of s-polynomials, specialized for the dynamic algorithm.
This class encapsulates the information necessary to create an \(S\)-polynomial, including the actual generation of an \(S\)-polynomial, though it does not retain that information. The main difference with Critical_Pair_Basic
is the enabling of late re-sorting.
Definition at line 142 of file critical_pair.hpp.
|
inline |
change the ordering associated with this pair
This is necessary at least for critical pairs where one polynomial is a generator that we have not yet computed. We delay re-sorting the polynomial until the s-polynomial’s computation.
Definition at line 202 of file critical_pair.hpp.
|
virtual |
creates the s-polynomial for first() and second()
If either first() or second() was sorted using an ordering different from the one assigned the pair, it is sorted anew.
Reimplemented from Critical_Pair_Basic.
Definition at line 118 of file critical_pair.cpp.