1 #include "problem.hpp" 2 #include <iostream> 3 main(void)4int main(void) 5 { 6 Problem p(10); 7 p.p_stack.sanity_check(); 8 p.p_stack.split(1,5); 9 p.p_stack.sanity_check(); 10 vec1<vec1<int> > state1 = p.p_stack.dumpCurrentPartition(); 11 p.full_search_memory_backtracker.pushWorld(); 12 assert(state1 == p.p_stack.dumpCurrentPartition()); 13 p.p_stack.sanity_check(); 14 p.p_stack.split(1,2); 15 p.p_stack.sanity_check(); 16 p.p_stack.split(2,7); 17 assert(p.p_stack.cellCount() == 4); 18 vec1<vec1<int> > state2 = p.p_stack.dumpCurrentPartition(); 19 p.full_search_memory_backtracker.pushWorld(); 20 assert(state2 == p.p_stack.dumpCurrentPartition()); 21 p.p_stack.sanity_check(); 22 p.full_search_memory_backtracker.popWorld(); 23 assert(state2 == p.p_stack.dumpCurrentPartition()); 24 p.full_search_memory_backtracker.popWorld(); 25 p.p_stack.sanity_check(); 26 assert(state1 == p.p_stack.dumpCurrentPartition()); 27 }