5 #include "weilei_lib/my_lib.h"
6 #include <itpp/itbase.h>
74 cout<<dec2bin(7,10)<<endl;
75 cout<<dec2bin(7,8)<<endl;
79 int main(
int args,
char ** argv){
80 RNG_randomize(); Real_Timer timer; timer.tic();
82 GF2mat Gax,Gaz,Cax,Caz;
83 GF2mat Gbx,Gbz,Cbx,Cbz;
84 int na,ka, Gax_row,Gaz_row;
85 int nb,kb, Gbx_row,Gbz_row;
87 int mode=atof(argv[1]);
88 char * title = argv[2];
89 char filename_Gax[256];
char filename_Gaz[256];
char filename_Gbx[256];
char filename_Gbz[256];
90 sprintf(filename_Gax,
"%sGax.mm",title); sprintf(filename_Gaz,
"%sGaz.mm",title); sprintf(filename_Gbx,
"%sGbx.mm",title); sprintf(filename_Gbz,
"%sGbz.mm",title);
95 na=randi(7,10); ka = randi(1,2);Gax_row=randi(1,na-ka-1); Gaz_row=na-ka-Gax_row;
97 nb=randi(7,10); kb = randi(1,2);Gbx_row=randi(1,nb-kb-1); Gbz_row=nb-kb-Gbx_row;
103 cout<<
"check "<<title<<endl;
109 cout<<
"Gax "<<Gax<<endl; cout<<
"Gaz "<<Gaz<<endl;
110 cout<<
"Gbx "<<Gbx<<endl; cout<<
"Gbz "<<Gbz<<endl;
121 cout<<
"[Code A] na = "<<na<<
", ";
122 cout<<
"dax = "<<dax<<
", daz = "<<daz<<endl;
128 cout<<
"[Code B] nb = "<<nb<<
", ";
129 cout<<
"dbx = "<<dbx<<
", dbz = "<<dbz<<endl;
130 reduce(Gax,Gaz,Gbx,Gbz,dax,daz,dbx,dbz);
131 concatenate(Gax,Gaz,Gbx,Gbz,dax,daz,dbx,dbz);
133 cout<<
"finish "<<title<<endl;