Gröbner basis project
Codebase for research into Gröbner basis computation
Critical_Pair_Dynamic Class Reference

Controls the creation of s-polynomials, specialized for the dynamic algorithm. More...

#include <critical_pair.hpp>

Inheritance diagram for Critical_Pair_Dynamic:
Critical_Pair_Basic

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_Polynomials_polynomial (SPolyCreationFlags method, int strategy)
 creates the s-polynomial for first() and second() More...
 
Basic properties
Weighted_Orderinghow_ordered () const
 the ordering associated with this pair
 
Modification
void change_ordering (Weighted_Ordering *new_order)
 change the ordering associated with this pair More...
 
- Public Member Functions inherited from Critical_Pair_Basic
 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_Polynomialfirst () const
 first polynomial in pair
 
const Abstract_Polynomialsecond () const
 second polynomial in pair
 
const Monomiallcm () const
 lcm of leading monomials of polynomials
 
unsigned lcm_degree (unsigned i) const
 degree of ith variable in lcm
 
const Monomialfirst_multiplier () const
 monomial needed to multiply first polynomial to lcm()
 
const Monomialsecond_multiplier () const
 monomial needed to multiply second polynomial to lcm()
 
const Pair_Strategy_Datapair_key () const
 strategy used for comparison of pairs
 
virtual Mutable_Polynomials_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_Orderingordering
 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.
 
- Protected Attributes inherited from Critical_Pair_Basic
Pair_Strategy_Datakey = nullptr
 strategy used to sort critical pairs
 
Abstract_Polynomialp
 first polynomial in the critical pair
 
Abstract_Polynomialq
 second polynomial in the critical pair
 
Mutable_Polynomials
 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

Detailed Description

Controls the creation of s-polynomials, specialized for the dynamic algorithm.

Author
John Perry
Date
2016

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.

Member Function Documentation

◆ change_ordering()

void Critical_Pair_Dynamic::change_ordering ( Weighted_Ordering new_order)
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.

◆ s_polynomial()

Mutable_Polynomial * Critical_Pair_Dynamic::s_polynomial ( SPolyCreationFlags  method,
int  strategy 
)
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.


The documentation for this class was generated from the following files: