libsemigroups
Public Member Functions | List of all members
libsemigroups::ReductionOrdering Class Reference

This class provides a call operator which can be used to compare libsemigroups::rws_word_t. More...

#include <rws.h>

Inheritance diagram for libsemigroups::ReductionOrdering:
Inheritance graph

Public Member Functions

 ReductionOrdering (std::function< bool(rws_word_t const *, rws_word_t const *)> func)
 A constructor. More...
 
size_t operator() (rws_word_t const *p, rws_word_t const *q) const
 Returns true if the word pointed to by p is greater than the word pointed to by q in the reduction ordering. More...
 
size_t operator() (rws_word_t const &p, rws_word_t const &q) const
 Returns true if the word p is greater than the word q in the reduction ordering. More...
 

Detailed Description

This class provides a call operator which can be used to compare libsemigroups::rws_word_t.

A reduction ordering is a linear order \(\prec\) with no infinite descending chains and where \(u \prec v\) for some libsemigroups::rws_word_t \(u\) and \(v\) implies that \( aub \prec avb\) for all libsemigroups::rws_word_t \(a\) and \(b\).

Constructor & Destructor Documentation

◆ ReductionOrdering()

libsemigroups::ReductionOrdering::ReductionOrdering ( std::function< bool(rws_word_t const *, rws_word_t const *)>  func)
inlineexplicit

A constructor.

This constructs a reduction ordering object whose call operator uses the function func to compare libsemigroups::rws_word_t's. It is the responsibility of the caller to verify that func specifies a reduction ordering.

Member Function Documentation

◆ operator()() [1/2]

size_t libsemigroups::ReductionOrdering::operator() ( rws_word_t const *  p,
rws_word_t const *  q 
) const
inline

Returns true if the word pointed to by p is greater than the word pointed to by q in the reduction ordering.

◆ operator()() [2/2]

size_t libsemigroups::ReductionOrdering::operator() ( rws_word_t const &  p,
rws_word_t const &  q 
) const
inline

Returns true if the word p is greater than the word q in the reduction ordering.


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