monoid.pxd 861 B

123456789101112131415161718192021222324252627
  1. from libc.stdint cimport uint8_t, uint_fast64_t
  2. cdef extern from "monoid.hpp":
  3. enum: cMAX_GENUS "MAX_GENUS"
  4. enum: cSIZE "SIZE"
  5. ctypedef uint_fast64_t ind_t
  6. ctypedef uint8_t dec_numbers[cSIZE]
  7. cdef cppclass monoid:
  8. dec_numbers decs
  9. ind_t conductor, min, genus
  10. void init_full_N(monoid &pm) nogil
  11. void print_monoid(const monoid &) nogil
  12. inline void remove_generator(monoid &dst, const monoid &src, ind_t) nogil
  13. inline monoid remove_generator(const monoid &src, ind_t) nogil
  14. # Fake type since Cython only allows for instanciation of template by types.
  15. cdef cppclass ALL:
  16. pass
  17. cdef cppclass CHILDREN:
  18. pass
  19. cdef cppclass generator_iter[T]:
  20. generator_iter(const monoid &mon) nogil
  21. bint move_next() nogil
  22. uint8_t count() nogil
  23. ind_t get_gen() nogil