libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
Knuth-Bendix

This page contains links to the documentation related to the implementation of the Knuth-Bendix algorithm in libsemigroups.

The purpose of this algorithm is to find a locally confluent presentation for a semigroup or monoid, with respect to some alphabet order and reduction ordering.

Topics

 KnuthBendix class
 Class template containing an implementation of the Knuth-Bendix Algorithm.
 
 Knuth-Bendix helper functions
 Helper functions for the KnuthBendix class.
 
 to<KnuthBendix>
 Convert to KnuthBendix instance.
 

Functions

template<typename Word, typename Rewriter, typename ReductionOrder>
std::ostreamoperator<< (std::ostream &os, KnuthBendix< Word, Rewriter, ReductionOrder > const &kb)
 Insert into std::ostream.
 
template<typename Word, typename Rewriter, typename ReductionOrder>
std::string to_human_readable_repr (KnuthBendix< Word, Rewriter, ReductionOrder > &kb)
 Return a string representation of a KnuthBendix instance.
 

Function Documentation

◆ operator<<()

template<typename Word, typename Rewriter, typename ReductionOrder>
std::ostream & operator<< ( std::ostream & os,
KnuthBendix< Word, Rewriter, ReductionOrder > const & kb )

Defined in knuth-bendix.hpp.

This function allows a KnuthBendix object to be left shifted into a std::ostream, such as std::cout. The currently active rules of the system are represented in the output.

Parameters
osthe output stream to insert into.
kbthe KnuthBendix object.
Returns
A reference to the first argument.

◆ to_human_readable_repr()

template<typename Word, typename Rewriter, typename ReductionOrder>
std::string to_human_readable_repr ( KnuthBendix< Word, Rewriter, ReductionOrder > & kb)

Defined in knuth-bendix.hpp.

This function returns a string representation of a KnuthBendix instance, specifying the size of the underlying alphabet and the number of active rules.

Template Parameters
Rewriterthe first template parameter for KnuthBendix.
ReductionOrderthe second template parameter for KnuthBendix.
Parameters
kbthe KnuthBendix instance.
Returns
The representation, a value of type std::string.