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

polynomial-related data for a weighted sugar strategy More...

#include <weighted_sugar_strategy.hpp>

Inheritance diagram for Poly_WSugar_Data:
Poly_Strategy_Data

Public Member Functions

 Poly_WSugar_Data (const Abstract_Polynomial *poly, const WT_TYPE *)
 records poly as the reference for this More...
 
virtual void at_generation_tasks ()
 sets the sugar to the largest weighted degree of a monomial in the assigned previously polynomial
 
virtual void at_generation_tasks (const Monomial &t)
 sets the sugar to the largest weighted degree of a monomial in the product of the monomial and the previously assigned polynomial
 
virtual bool equivalent (const Poly_Strategy_Data &sd) const
 returns true iff the sugars are equal
 
virtual bool first_larger (const Poly_Strategy_Data &sd) const
 returns true iff this sugar is larger than sd ’s
 
virtual void pre_reduction_tasks (const EXP_TYPE *u, const Abstract_Polynomial &g)
 re-evaluates the sugar, if need be
 
Basic properties
StrategyFlags type ()
 type of strategy
 
DEG_TYPE poly_sugar () const
 the sugar itself
 
const WT_TYPE * weighting () const
 the weights used to compute the sugar
 
Modification
void change_weights (const WT_TYPE *w)
 changes the weights used to compute the sugar to w
 
- Public Member Functions inherited from Poly_Strategy_Data
virtual ~Poly_Strategy_Data ()
 
bool operator== (const Poly_Strategy_Data &other) const
 alias for equivalent()
 
bool operator> (const Poly_Strategy_Data &other) const
 alias for first_larger()
 
bool operator>= (const Poly_Strategy_Data &other) const
 is this larger than or equivalent to other?
 
bool operator< (const Poly_Strategy_Data &other) const
 is this smaller than other?
 
bool operator<= (const Poly_Strategy_Data &other) const
 is this smaller than or equivalent to other?
 
virtual bool valid_reduction (const Abstract_Polynomial &r, const Abstract_Polynomial &g) const
 hook called while finding a reducer More...
 
void pre_reduction_tasks (const Monomial &u, const Abstract_Polynomial &g)
 

Protected Attributes

DEG_TYPE sugar
 the polynomial’s sugar
 
const WT_TYPE * weights
 pointer to the weights
 
- Protected Attributes inherited from Poly_Strategy_Data
const Abstract_Polynomialp
 the polynomial to which this strategy applies
 

Friends

I/O
ostream & operator<< (ostream &, const Poly_WSugar_Data &)
 
I/O

Detailed Description

polynomial-related data for a weighted sugar strategy

Author
John Perry
Date
2016

This strategy is based on a weight vector, rather than simply adding exponents. While the weight vector can be that of a weighted ordering, one is also free to use a different weight altogether. Simply supply the relevant data.

Definition at line 22 of file weighted_sugar_strategy.hpp.

Constructor & Destructor Documentation

◆ Poly_WSugar_Data()

Poly_WSugar_Data::Poly_WSugar_Data ( const Abstract_Polynomial poly,
const WT_TYPE *  w 
)

records poly as the reference for this

This expects the weights to be as long as the number of monomials. It copies the list, so you can subsequently modify it without subsequently affecting correctness.

Warning
The weights are not copied. Please do not modify them, as behavior is hard to predict in this case. It is predictable, but it’s likely highly undesirable. Better to create a new Poly_WSugar_Data instead.

Definition at line 10 of file weighted_sugar_strategy.cpp.


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