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_