33 #ifndef SIMPLEBASECHANGE_H_
34 #define SIMPLEBASECHANGE_H_
36 #include <permlib/change/base_change.h>
41 template<
class PERM,
class TRANS,
class BASETRANSPOSE>
48 template <
class InputIterator>
49 void change(
BSGS<PERM,TRANS> &bsgs, InputIterator baseBegin, InputIterator baseEnd,
bool skipRedundant =
false)
const;
56 template<
class PERM,
class TRANS,
class BASETRANSPOSE>
61 template<
class PERM,
class TRANS,
class BASETRANSPOSE>
62 template<
class InputIterator>
64 if (baseBegin == baseEnd)
67 const unsigned long origOrder __attribute__((unused)) = bsgs.
order();
70 unsigned int baseTargetPos = 0;
71 while (baseBegin != baseEnd && baseTargetPos < bsgs.
B.size()) {
72 unsigned long alpha = *baseBegin;
73 unsigned long beta = bsgs.
B[baseTargetPos];
74 const bool redundant = skipRedundant && this->isRedundant(bsgs, baseTargetPos, alpha);
76 if (!redundant && beta != alpha) {
78 for (; pos > baseTargetPos; --pos) {
79 trans.transpose(bsgs, pos-1);
89 while (!skipRedundant && baseBegin != baseEnd) {
90 const unsigned long alpha = *baseBegin;
100 BOOST_ASSERT(origOrder == bsgs.
order());
105 #endif // -- SIMPLEBASECHANGE_H_