monoid.cpp 621 B

1234567891011121314151617181920212223242526272829
  1. #include <iostream>
  2. #include "monoid.hpp"
  3. void init_full_N(monoid &m)
  4. {
  5. epi8 block ={1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8};
  6. for(auto i=0; i<NBLOCKS; i++){
  7. m.blocks[i] = block;
  8. block = block + 8;
  9. }
  10. m.genus = 0;
  11. m.conductor = 1;
  12. m.min = 1;
  13. }
  14. void print_monoid(const monoid &m)
  15. {
  16. unsigned int i;
  17. std::cout<<"min = "<<m.min<<", cond = "<<m.conductor<<", genus = "<<m.genus<<", decs = ";
  18. for (i=0; i<SIZE; i++) std::cout<<((int) m.decs[i])<<' ';
  19. std::cout<<std::endl;
  20. }
  21. void print_epi8(epi8 bl)
  22. {
  23. unsigned int i;
  24. for (i=0; i<16; i++) std::cout<<((uint8_t*)&bl)[i]<<' ';
  25. std::cout<<std::endl;
  26. }