33 #ifndef PARTITION_VECTOR_STABILIZER_SEARCH_H_ 34 #define PARTITION_VECTOR_STABILIZER_SEARCH_H_ 36 #include <permlib/search/partition/r_base.h> 37 #include <permlib/predicate/vector_stabilizer_predicate.h> 38 #include <permlib/search/partition/set_stabilize_refinement.h> 39 #include <permlib/search/partition/refinement_family.h> 45 template<
class BSGSIN,
class TRANSRET>
48 typedef typename RBase<BSGSIN,TRANSRET>::PERM PERM;
64 template<
class InputIterator>
65 void construct(InputIterator begin, InputIterator end,
unsigned int maxEntries);
69 std::vector<unsigned int> toStab;
70 unsigned int m_maxEntries;
73 template<
class BSGSIN,
class TRANSRET>
75 :
RBase<BSGSIN,TRANSRET>(bsgs, pruningLevelDCM)
78 template<
class BSGSIN,
class TRANSRET>
79 template<
class InputIterator>
82 m_maxEntries = maxEntries;
83 toStab.insert(toStab.begin(), begin, end);
84 std::vector<unsigned int> stabC(toStab.size());
86 #ifdef PERMLIB_DEBUGMODE 87 BOOST_FOREACH(
const unsigned int v, stabC) {
88 BOOST_ASSERT( v < maxEntries );
94 for (
unsigned int c = 0; c < maxEntries - 1; ++c) {
96 std::vector<unsigned int>::iterator stabIt = toStab.begin(), cIt = stabC.begin();
97 for (; stabIt != toStab.end(); ++stabIt) {
98 BOOST_ASSERT( cIt != stabC.end() );
105 PERM empty(this->m_bsgs.n);
106 ssr.apply2(this->m_partition2, empty);
111 template<
class BSGSIN,
class TRANSRET>
114 if (!this->m_limitInitialized) {
115 bool allFound =
true;
117 BOOST_FOREACH(
unsigned int alpha, toStab) {
119 if (alpha == m_maxEntries - 1)
127 this->m_limitLevel = level;
128 this->m_limitBase = basePos;
129 this->m_limitInitialized =
true;
138 #endif // -- PARTITION_VECTOR_STABILIZER_SEARCH_H_ subgroup search for a stabilizer of an integer vector based on partition backtracking ...
Definition: vector_stabilizer_search.h:46
bool initializeAndApply(Partition &pi)
applies (left-)refinement to partition and initializes refinement for future use in R-base ...
Definition: refinement.h:136
vector_t::const_iterator fixPointsEnd() const
iterator to the end of fix points
Definition: partition.h:167
concrete -refinements for set stabilization
Definition: set_stabilize_refinement.h:50
partition
Definition: partition.h:48
virtual unsigned int processNewFixPoints(const Partition &pi, unsigned int backtrackCount)
callback when a new fix point appears during R-base construction
Definition: vector_stabilizer_search.h:112
VectorStabilizerSearch(const BSGSIN &bsgs, unsigned int pruningLevelDCM)
constructor
Definition: vector_stabilizer_search.h:74
void construct(InputIterator begin, InputIterator end, unsigned int maxEntries)
initializes search
Definition: vector_stabilizer_search.h:80
R-base for partition backtracking.
Definition: r_base.h:56
void construct(SubgroupPredicate< PERM > *pred, RefinementFamily< PERM > *predRefinement)
constructs an R-base for given predicate and refinement family
Definition: r_base.h:115
virtual unsigned int processNewFixPoints(const Partition &pi, unsigned int level)
callback when a new fix point appears during R-base construction
Definition: r_base.h:197
vector_t::const_iterator fixPointsBegin() const
iterator to the begin of fix points
Definition: partition.h:164
Definition: abstract_bsgs.h:49
predicate for the subgroup that stabilizes a given integer vector
Definition: vector_stabilizer_predicate.h:44