#include #include #include #include #include #include #include "treewalk.hpp" using namespace std; using namespace std::chrono; fstream file; void treat(const monoid& m){ int w=m.e*m.left-m.conductor; if(w<=0){ if(m.e!=3 and (m.e!=m.min or m.left_primitive!=1)){ output(m,file); } } } //static const int mcut=ceil(float(3*(MAX_GENUS+2))/5); bool cut(const monoid& m){ if(3*m.left_primitive>=m.min) return true; return false; } void walk_children(monoid m) { monoid data[MAX_GENUS-1], *stack[MAX_GENUS], *current,temp; monoid **stack_pointer = stack + 1; for (ind_t i=1; igenus < MAX_GENUS - 1) { auto it = generator_iter(*current); ind_t pos=0; while (it.move_next()) { // exchange top with top+1 stack_pointer[0] = stack_pointer[1]; remove_generator(**stack_pointer, *current, it.get_gen(),pos++); treat(**stack_pointer); stack_pointer++; } *stack_pointer = current; } else { auto it = generator_iter(*current); ind_t pos=0; while (it.move_next()) { remove_generator(temp, *current, it.get_gen(),pos++); treat(temp); } } } } } int main(int argc, char **argv) { monoid O,S; string nproc = "0"; if(argc!=3){ cerr<<"Usage : "<=m){ cerr<<"k must be in [1,m-1]"< ticks = end-begin; cout << " Computation time = " << std::setprecision(4) << ticks.count() << " s." << endl; file.close(); return EXIT_SUCCESS; }