33 #ifndef SETIMAGEREFINEMENT_H_
34 #define SETIMAGEREFINEMENT_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>
61 template<
class InputIterator>
62 SetImageRefinement(
unsigned long n, InputIterator begin, InputIterator end, InputIterator beginImg, InputIterator endImg);
69 std::vector<unsigned long> delta;
70 std::vector<unsigned long> gamma;
74 template<
class InputIterator>
76 :
Refinement<PERM>(n, Default), delta(begin, end), gamma(beginImg, endImg)
78 std::sort(delta.begin(), delta.end());
79 std::sort(gamma.begin(), gamma.end());
84 BOOST_ASSERT( this->initialized() );
87 PERMLIB_DEBUG(std::cout <<
"apply set image1 " << cell << std::endl;)
88 if (pi.
intersect(delta.begin(), delta.end(), cell))
96 BOOST_ASSERT( this->initialized() );
99 PERMLIB_DEBUG(std::cout <<
"apply set image2 " << cell << std::endl;)
100 if (pi.
intersect(gamma.begin(), gamma.end(), cell))
108 for (
unsigned int c = 0; c < pi.
cells(); ++c) {
109 if (pi.
intersect(delta.begin(), delta.end(), c))
123 #endif // -- SETIMAGEREFINEMENT_H_