33 #ifndef SYMMETRICGROUP_H_
34 #define SYMMETRICGROUP_H_
36 #include <permlib/bsgs_core.h>
37 #include <permlib/transversal/symmetric_group_transversal.h>
39 #include <boost/shared_ptr.hpp>
52 struct SymmetricGroup :
public BSGSCore<PERM, SymmetricGroupTransversal<PERM> > {
63 virtual bool isSymmetricGroup()
const {
return true; }
72 BOOST_ASSERT(this->n > 0);
74 for (
unsigned int i = 0; i < this->n; ++i) {
77 if (i <
static_cast<unsigned int>(this->n-1)) {
78 boost::shared_ptr<PERM> gen(
new PERM(this->n));
79 gen->setTransposition(i, i+1);
88 const unsigned long& n2 = symGroup.n;
90 for (
unsigned int i = 0; i < n2; ++i) {
94 boost::shared_ptr<PERM> gen(
new PERM(n2));
95 gen->setTransposition(i, i+1);
111 BOOST_ASSERT(symGroup.n == this->n);
122 #endif // SYMMETRICGROUP_H_