3.2.2. generated.hpp

Full path: group/generated.hpp

template<typename Alloc, typename DupChecker = DupCheckerNop>
class generated_group

Models Group.

Requires Allocator<Alloc>.

A basic group implementation representing it by a generating set of permutations.

Template Parameters
  • Alloc – the allocator to use.

  • DupChecker – a function object for checking if a permutation is already in the generating set.

using allocator = Alloc
using perm = typename allocator::perm
using pointer = typename allocator::pointer
using const_pointer = typename allocator::const_pointer
explicit generated_group(const allocator &alloc, DupChecker dupChecker = DupChecker())

Construct the trivial group on alloc.degree() elements.

explicit generated_group(std::size_t n)

Construct the trivial group on n elements.

Requires valid expression: allocator(n)

template<typename UPerm>
void add_generator(UPerm &&perm)

Add a copy of perm as a new generator to the group. The DupChecker is used for deciding if the new generator already exists.

template<typename UPerm, typename Next>
void add_generator(UPerm &&perm, Next next)

Add a copy of perm as a new generator to the group. The DupChecker is used for deciding if the new generator already exists. If the permutation is added, the next function is called with three iterators: next(first, lastOld, lastNew) where the range first to lastOld denotes the generating set of the group before the call, and the range lastOld to lastNew denotes the added generators.

std::size_t degree() const
PtrContainerToPermProxy<Store, perm> generators() const
PtrContainerToPtrProxy<Store, const_pointer> generator_ptrs() const
allocator &get_allocator() const