Member functions

This page contains information about the member functions of the Sims1 class.

inline const_iterator libsemigroups::Sims1::cbegin(size_type n) const

Returns a forward iterator pointing at the first congruence.

Returns a forward iterator pointing to the ActionDigraph representing the first congruence described by Sims1 object with at most n classes.

If incremented, the iterator will point to the next such congruence. The order which the congruences are returned in is implementation specific. Iterators of the type returned by this function are equal whenever they point to equal objects. The iterator is exhausted if and only if it points to an ActionDigraph with zero nodes.

See also

cend

Warning

Copying iterators of this type is expensive. As a consequence, prefix incrementing ++it the returned iterator it significantly cheaper than postfix incrementing it++.

Parameters

n – the maximum number of classes in a congruence.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

An iterator it of type const_iterator pointing to an ActionDigraph with at most n nodes.

inline const_iterator libsemigroups::Sims1::cend(size_type) const

Returns a forward iterator pointing one beyond the last congruence.

Returns a forward iterator pointing to the empty ActionDigraph. If incremented, the returned iterator remains valid and continues to point at the empty ActionDigraph.

See also

cbegin

Warning

Copying iterators of this type is expensive. As a consequence, prefix incrementing ++it the returned iterator it significantly cheaper than postfix incrementing it++.

Parameters

n – the maximum number of classes in a congruence.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

An iterator it of type const_iterator pointing to an ActionDigraph with at most 0 nodes.

inline Presentation<word_type> const &libsemigroups::Sims1::extra() const noexcept

Returns a const reference to the additional defining pairs.

The congruences computed by cbegin and cend always contain the relations of this presentation. In other words, the congruences computed by this instance are only taken among those that contains the pairs of elements of the underlying semigroup (defined by the presentation returned by presentation()) represented by the relations of the presentation returned by extra().

See also

presentation for further details about the return value of this function.

Throws

(None) – This function is noexcept and is guaranteed never to throw.

uint64_t libsemigroups::Sims1::number_of_congruences(size_type n) const

Returns the number of one-sided congruences with up to a given number of classes.

This function is synonymous with std::distance(begin(), end()) and exists only to provide some feedback on the progress of the computation if it runs for more than 1 second.

Parameters

n – the maximum number of congruence classes.

Throws

(None) – This function guarantees not to throw a LibsemigroupsException.

Returns

A value of type uint64_t.

inline Presentation<word_type> const &libsemigroups::Sims1::presentation() const noexcept

Returns a const reference to the defining presentation.

This function returns the defining presentation of a Sims1 instance. The congruences computed by cbegin and cend are defined over the semigroup or monoid defined by this presentation.

Note that it might not be the case that the value returned by this function and the presentation used to construct the object are the same. A Sims1 object requires the generators of the defining presentation \(\mathcal{P}\) to be \(\{0, \ldots, n - 1\}\) where \(n\) is the size of the alphabet of \(\mathcal{P}\). Every occurrence of every generator a in the presentation p used to construct a Sims1 instance is replaced by p.index(a).

Parameters

(None)

Warning

If split_at has been called, then some of the defining relations may have been removed from the presentation.

Throws

(None) – This function is noexcept and is guaranteed never to throw.

Returns

A const reference to a Presentation object.

inline void libsemigroups::Sims1::split_at(size_type val)

Only apply certain relations when an otherwise compatible ActionDigraph is found.

This function splits the relations in the underlying presentation into two parts: those before the relation with index val and those after. The order of the relations is the same as the order in the constructing presentation. In some instances if the relations after index val are “long” and those before are “short”, then this can improve the performance. It can also make the performance worse, and should be used with care.

Parameters

val – the relation to split at

Throws

LibsemigroupsException – if val is out of bounds.

Returns

(None)