1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #include <iostream>
- #include "monoid.hpp"
- void init_full_N(monoid &m)
- {
- epi8 block ={1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8};
- for(auto i=0; i<NBLOCKS; i++){
- m.blocks[i] = block;
- block = block + 8;
- }
- m.genus = 0;
- m.conductor = 1;
- m.min = 1;
- m.left=1;
- m.left_primitive=0;
- m.e=1;
- m.wilf=0;
- }
- void init_ordinary(monoid &O,int m){
- O.decs[0]=1;
- for(auto i=1;i<2*m;++i){
- O.decs[i]=i/m;
- }
- for(auto i=0;i<SIZE-2*m;++i){
- O.decs[2*m+i]=2+i/2;
- }
-
- O.genus = m-1;
- O.conductor = m;
- O.min = m;
- O.left=1;
- O.left_primitive=0;
- O.e=m;
- O.wilf=0;
- }
- void print_monoid(const monoid &m)
- {
- unsigned int i;
- std::cout<<"min = "<<m.min<<", cond = "<<m.conductor<<", genus = "<<m.genus<<", decs = ";
- for (i=0; i<SIZE; i++) std::cout<<((int) m.decs[i])<<' ';
- std::cout<<std::endl;
- }
- void print_monoid_gen(const monoid &m)
- {
- unsigned int i;
- std::cout<<"min = "<<m.min<<", cond = "<<m.conductor<<", genus = "<<m.genus<<", gen = ";
- std::cout<<"< ";
- for (i=1; i<SIZE; i++){
- if(m.decs[i]==1){
- std::cout<<i<<' ';
- }
- }
- std::cout<<'>'<<std::endl;
- }
- void output(const monoid& m,fstream& f){
- f<<"w = "<<m.wilf<<" : < ";
- for (auto i=1; i<SIZE; i++){
- if(m.decs[i]==1){
- f<<i<<' ';
- }
- }
- f<<'>'<<endl;
- }
- void print_epi8(epi8 bl)
- {
- unsigned int i;
- for (i=0; i<16; i++) std::cout<<((uint8_t*)&bl)[i]<<' ';
- std::cout<<std::endl;
- }
|