add_generator¶
-
void
libsemigroups::FroidurePin
::
add_generator
(const_reference x)¶ Add a copy of the generators
x
to the generators ofthis
.This member function can be used to add new generators to the existing semigroup in such a way that any previously enumerated data is preserved and not recomputed, or copied. This can be faster than recomputing the semigroup generated by the old generators and the new generators in the parameter
coll
.This member function changes the semigroup in-place, thereby invalidating possibly previously known data about the semigroup, such as the left or right Cayley graphs, number of idempotents, and so on.
Every generator in
coll
is added regardless of whether or not it is already a generator or element of the semigroup (it may belong to the semigroup but just not be known to belong). Ifcoll
is empty, then the semigroup is left unchanged. The order the generators is added is also the order they occur in the parametercoll
.The semigroup is returned in a state where all of the previously enumerated elements which had been multiplied by all of the old generators, have now been multiplied by all of the old and new generators. This means that after this member function is called the semigroup might contain many more elements than before (whether it is fully enumerating or not).