copy_closure

template<typename TCollection>
FroidurePin *libsemigroups::FroidurePin::copy_closure(TCollection const &coll)

Returns a new semigroup generated by this and copies of the non-redundant elements of coll.

This member function is equivalent to copying this and then calling FroidurePin::closure on the copy with coll, but this member function avoids copying the parts of this that are immediately invalidated by FroidurePin::closure.

The elements the argument coll are copied into the semigroup, and should be deleted by the caller. If an element in coll has a degree different to this->degree(), a LibsemigroupsException will be thrown.