Gröbner basis project
Codebase for research into Gröbner basis computation
Monomial_Ordering Class Referenceabstract

interface to a monomial ordering More...

#include <monomial_ordering.hpp>

Inheritance diagram for Monomial_Ordering:
Generic_Grevlex Grevlex_Ordering Lex_Ordering Matrix_Ordering Weighted_Ordering CachedWGrevlex_Ordering WGrevlex

Public Member Functions

Destruction
virtual ~Monomial_Ordering ()
 needs virtual destructor for polymorphic delete
 
Utility
virtual void set_data (Monomial &)
 sets monomial ordering’s data; default is to do nothing
 
Comparison
virtual int cmp (const Monomial &t, const Monomial &u) const =0
 {@ More...
 
virtual bool first_larger (const Monomial &, const Monomial &) const =0
 returns true iff the first Monomial is larger than the second
 
bool first_larger_or_equal (const Monomial &, const Monomial &) const
 returns true iff the first Monomial is larger or equal to the second More...
 
virtual bool first_smaller (const Monomial &, const Monomial &) const =0
 returns true iff the first Monomial is smaller than the second More...
 
bool first_smaller_or_equal (const Monomial &, const Monomial &) const
 returns true iff the first Monomial is smaller or equal to the second More...
 
virtual bool first_larger_than_multiple (const Monomial &, const Monomial &, const Monomial &) const =0
 returns true iff the first Monomial is larger than the specified multiple of the second
 
bool first_larger_or_equal_than_multiple (const Monomial &, const Monomial &, const Monomial &) const
 returns true iff the first Monomial is larger or equal to the specified multiple of the second More...
 
bool first_smaller_than_multiple (const Monomial &, const Monomial &, const Monomial &) const
 returns true iff the first Monomial is smaller than the specified multiple of the second More...
 
bool first_smaller_or_equal_than_multiple (const Monomial &, const Monomial &, const Monomial &) const
 returns true iff the first Monomial is smaller or equal to the specified multiple of the second More...
 

Detailed Description

interface to a monomial ordering

Author
John Perry
Date
2015
Warning
Avoid changing the monomial ordering data in the comparison functions, as the user may wish to compare two monomials according to a different ordering than the current value. This is the reason those functions are marked to leave the Monomials constant. The expected behavior is that first_larger() does whatever the ordering wants, so if you need monomial data check first to decide whether it exists, and applies to this ordering! Use set_data() if you want to change the monomials first.
There is no strict need to check whether the monomials are associated to the same ordering, but if the ordering uses Monomial_Order_Data one would be foolhardy not to check first.
Examples:
test_cyclicn.cpp.

Definition at line 60 of file monomial_ordering.hpp.

Member Function Documentation

◆ cmp()

virtual int Monomial_Ordering::cmp ( const Monomial t,
const Monomial u 
) const
pure virtual

{@

returns 0 if the Monomials are like; negative if smaller, positive if larger – for efficiency, you probably want to redefine this

Implemented in Matrix_Ordering, CachedWGrevlex_Ordering, Lex_Ordering, WGrevlex, Grevlex_Ordering, and Generic_Grevlex.

◆ first_larger_or_equal()

bool Monomial_Ordering::first_larger_or_equal ( const Monomial t,
const Monomial u 
) const

returns true iff the first Monomial is larger or equal to the second

See also
first_larger()
Warning
Do not override unless you know what you’re doing

Definition at line 460 of file monomial.cpp.

◆ first_larger_or_equal_than_multiple()

bool Monomial_Ordering::first_larger_or_equal_than_multiple ( const Monomial t,
const Monomial u,
const Monomial v 
) const

returns true iff the first Monomial is larger or equal to the specified multiple of the second

See also
first_larger()
Warning
Do not override unless you know what you’re doing

Definition at line 466 of file monomial.cpp.

◆ first_smaller()

virtual bool Monomial_Ordering::first_smaller ( const Monomial ,
const Monomial  
) const
pure virtual

returns true iff the first Monomial is smaller than the second

Warning
Do not override unless you know what you’re doing

Implemented in Matrix_Ordering, CachedWGrevlex_Ordering, Lex_Ordering, WGrevlex, Grevlex_Ordering, and Generic_Grevlex.

◆ first_smaller_or_equal()

bool Monomial_Ordering::first_smaller_or_equal ( const Monomial t,
const Monomial u 
) const

returns true iff the first Monomial is smaller or equal to the second

See also
first_larger()
Warning
Do not override unless you know what you’re doing

Definition at line 8 of file monomial_ordering.cpp.

◆ first_smaller_or_equal_than_multiple()

bool Monomial_Ordering::first_smaller_or_equal_than_multiple ( const Monomial t,
const Monomial u,
const Monomial v 
) const

returns true iff the first Monomial is smaller or equal to the specified multiple of the second

See also
first_larger()
Warning
Do not override unless you know what you’re doing

Definition at line 20 of file monomial_ordering.cpp.

◆ first_smaller_than_multiple()

bool Monomial_Ordering::first_smaller_than_multiple ( const Monomial t,
const Monomial u,
const Monomial v 
) const

returns true iff the first Monomial is smaller than the specified multiple of the second

Warning
Do not override unless you know what you’re doing

Definition at line 14 of file monomial_ordering.cpp.


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