Public Member Functions | |
OrRule (const VCBuilder &builder) | |
int | operator() (const VC &vc, const VCList *semi_list, VCList *full_list, std::list< VC > &added, int max_ors, ChangeLog< VC > *log, VCBuilderStatistics &stats) |
Runs over all subsets of size 2 to max_ors of semis containing vc and adds the union to out if it has an empty intersection. | |
Private Attributes | |
const VCBuilder & | m_builder |
std::vector< VC > | m_semi |
Vectors used in or rule computation are reused between calls to avoid unnecessary dynamic memory allocation. | |
std::vector< bitset_t > | m_tail |
Definition at line 205 of file VCBuilder.hpp.
VCBuilder::OrRule::OrRule | ( | const VCBuilder & | builder | ) | [inline] |
Definition at line 208 of file VCBuilder.hpp.
int VCBuilder::OrRule::operator() | ( | const VC & | vc, | |
const VCList * | semi_list, | |||
VCList * | full_list, | |||
std::list< VC > & | added, | |||
int | max_ors, | |||
ChangeLog< VC > * | log, | |||
VCBuilderStatistics & | stats | |||
) |
Runs over all subsets of size 2 to max_ors of semis containing vc and adds the union to out if it has an empty intersection.
This function is a major bottleneck and so needs to be as efficient as possible.
TODO: Document this more!
TODO: Check if unrolling the recursion really does speed it up.
Create a new full.
Create a new full. This vc has one or both captured sets in its carrier.
Definition at line 618 of file VCBuilder.cpp.
References VCList::add(), VCList::ADD_FAILED, VCList::begin(), VC::carrier(), VCList::empty(), VCList::end(), benzene_bitset< _Nb >::flip(), VCList::getX(), VCList::getY(), HexAssert, BitsetUtil::IsSubsetOf(), m_builder, VCBuilder::m_capturedSet, m_semi, m_tail, VCBuilderStatistics::or_attempts, VCBuilderStatistics::or_successes, VCList::softlimit(), and VC_RULE_OR.
const VCBuilder& VCBuilder::OrRule::m_builder [private] |
Definition at line 217 of file VCBuilder.hpp.
Referenced by operator()().
std::vector<VC> VCBuilder::OrRule::m_semi [private] |
Vectors used in or rule computation are reused between calls to avoid unnecessary dynamic memory allocation.
Definition at line 220 of file VCBuilder.hpp.
Referenced by operator()().
std::vector<bitset_t> VCBuilder::OrRule::m_tail [private] |
Definition at line 221 of file VCBuilder.hpp.
Referenced by operator()().