33 #ifndef SETSTABILIZEREFINEMENT_H_ 34 #define SETSTABILIZEREFINEMENT_H_ 36 #include <permlib/predicate/pointwise_stabilizer_predicate.h> 38 #include <permlib/search/partition/partition.h> 39 #include <permlib/search/partition/refinement.h> 42 #include <boost/dynamic_bitset.hpp> 43 #include <boost/foreach.hpp> 53 template<
class InputIterator>
60 std::vector<unsigned long> toStab;
64 template<
class InputIterator>
66 :
Refinement<PERM>(n, Default), toStab(begin, end)
68 std::sort(toStab.begin(), toStab.end());
69 PERMLIB_DEBUG(print_iterable(toStab.begin(), toStab.end(), 0,
"to stab");)
74 BOOST_ASSERT( this->initialized() );
77 PERMLIB_DEBUG(std::cout <<
"apply set stab " << cell << std::endl;)
78 if (pi.
intersect(toStab.begin(), toStab.end(), cell))
86 for (
unsigned int c = 0; c < pi.
cells(); ++c) {
87 if (pi.
intersect(toStab.begin(), toStab.end(), c))
101 #endif // -- SETSTABILIZEREFINEMENT_H_ concrete -refinements for set stabilization
Definition: set_stabilize_refinement.h:50
virtual unsigned int apply(Partition &pi) const
applies (left-)refinement to pi which is the original partition this refinement was initialized to ...
Definition: set_stabilize_refinement.h:73
base class for a -refinement which is used in an R-base and bound to an initial partition ...
Definition: refinement.h:53
virtual bool init(Partition &pi)
initializes refinement
Definition: set_stabilize_refinement.h:85
partition
Definition: partition.h:48
unsigned long cells() const
number of cells in this partition
Definition: partition.h:157
bool intersect(ForwardIterator begin, ForwardIterator end, unsigned int j)
intersects the j-th cell of this partition with a given set
Definition: partition.h:186
SetStabilizeRefinement(unsigned long n, InputIterator begin, InputIterator end)
constructor
Definition: set_stabilize_refinement.h:65
Definition: abstract_bsgs.h:49