92 std::vector<dom_int> &B = bsgs.
B;
93 std::vector<TRANS> &U = bsgs.
U;
102 std::swap(B[i], B[i+1]);
107 unsigned int targetTransversalSize = U[i+1].size() * U[i].size();
111 U_i.orbit(B[i], S_i);
112 targetTransversalSize /= U_i.size();
114 m_statScheierGeneratorsConsidered = 0;
115 m_statNewGenerators = 0;
116 TRANS U_i1(U[i+1].n());
117 U_i1.orbit(B[i+1], S_i1);
118 boost::scoped_ptr<Generator<PERM> > generator(setupGenerator(bsgs, i, S_i, U_i));
119 BOOST_ASSERT(generator != 0);
121 while (U_i1.size() < targetTransversalSize) {
122 bool newGeneratorFound =
false;
123 while (generator->hasNext()) {
124 PERM g = generator->next();
125 ++m_statScheierGeneratorsConsidered;
126 boost::indirect_iterator<typename PERMlist::iterator> sBegin(S_i1.begin()), sEnd(S_i1.end());
127 if (!U_i1.contains(g / B[i+1]) && std::find(sBegin, sEnd, g) == sEnd) {
129 boost::shared_ptr<PERM> gen(
new PERM(g));
130 S_i1.push_front(gen);
131 ++m_statNewGenerators;
132 U_i1.orbitUpdate(B[i+1], S_i1, gen);
133 newGeneratorFound =
true;
137 if (!newGeneratorFound)
141 BOOST_ASSERT(U_i1.size() >= targetTransversalSize);
143 bsgs.
S.insert(bsgs.
S.end(), S_i1.begin(), boost::next(S_i1.begin(), m_statNewGenerators));
void transpose(BSGS< PERM, TRANS > &bsgs, unsigned int i) const
performs a base transposition on bsgs between bsgs.B[i] and bsgs.B[i+1]
Definition base_transpose.h:91
virtual Generator< PERM > * setupGenerator(BSGS< PERM, TRANS > &bsgs, unsigned int i, const PERMlist &S_i, const TRANS &U_i) const =0
initializes the specific Schreier Generator that is used for the BaseTranpose implementation
OutputIterator copy_if(InputIterator begin, InputIterator end, OutputIterator destBegin, Predicate p)
copies elements of (begin to end) to destBegin if they match the given predicate
Definition common.h:49