cuts.hpp 807 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef CUT_HPP
  2. #define CUT_HPP
  3. #include "semigroup.hpp"
  4. bool cut(const Semigroup& S);
  5. bool cut_wilf_left_primitives(const Semigroup& S);
  6. bool is_special(const Semigroup& S);
  7. bool wilf1(const Semigroup& S);
  8. bool wilf2(const Semigroup& S);
  9. bool wilf3(const Semigroup& S);
  10. inline bool cut(const Semigroup& S){
  11. //return false;
  12. return (not wilf1(S)) or (not wilf2(S));
  13. // return !is_special(S);
  14. }
  15. inline bool is_special(const Semigroup& S){
  16. ind_t c=S.conductor;
  17. ind_t m=S.min;
  18. ind_t x=c+(m-1)-c%m;
  19. return S.decs[x]==1;
  20. }
  21. inline bool wilf1(const Semigroup& S){
  22. return K_MANUEL*S.left_primitive<S.min;
  23. }
  24. inline bool wilf2(const Semigroup& S){
  25. return (K_MANUEL*S.e)<S.min+K_MANUEL*(MAX_GENUS-S.genus);
  26. }
  27. /*inline bool wilf3(const Semigroup& S){
  28. return 5*S.min<3*(MAX_GENUS+1);
  29. }*/
  30. #endif