work.hpp 353 B

123456789101112131415161718192021222324
  1. #ifndef WORK_HPP
  2. #define WORK_HPP
  3. #include <iostream>
  4. #include "treewalk.hpp"
  5. using namespace std;
  6. bool work_on(Semigroup& S,size_t* res){
  7. Stack stack;
  8. for(size_t g=0;g<=MAX_GENUS;++g){
  9. res[g]=0;
  10. }
  11. if(is_special(S)){
  12. res[S.genus]=1;
  13. Semigroup* root=stack.pushed();
  14. *root=S;
  15. walk(stack,res);
  16. }
  17. return false;
  18. }
  19. #endif