#include #include #include #include #include #include #include #include #include "treewalk.hpp" using namespace std; using namespace std::chrono; bool stack_correct; #define SIGNAL_CHECKPOINT SIGUSR2 void treat(const Semigroup& m){ int q=ceil(float(m.conductor)/float(m.min)); unsigned int rho=q*m.min-m.conductor; if(m.wilf<=rho){ if((m.wilf<0) or (m.wilf<=rho and m.e>2 and m.left_primitive>1 and q>=4)){ //output(m,file_out); } } } void walk(Stack& stack,size_t* res){ Semigroup *current,*son; Semigroup temp; while(not stack.is_empty()){ current = stack.pop(); size_t g=current->genus; if(true or not cut(*current)){ if(g < MAX_GENUS - 1){ auto it=generator_iter(*current); ind_t pos=0; while (it.move_next()){ remove_generator(temp, *current, it.get_gen(),pos++); if(is_special(temp)){ son=stack.pushed(); *son=temp; res[g+1]++; } //treat(*son); } } else{ auto it = generator_iter(*current); ind_t pos=0; while (it.move_next()){ remove_generator(temp, *current, it.get_gen(),pos++); if(is_special(temp)){ res[g+1]++; } //treat(temp); } } } } } /*int main(int argc, char **argv){ if(argc!=2){ cerr<<"Usage : "<