git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/XMLTree@261
3cdefd35-fc62-479d-8e8d-
bae585ffb9ca
//static_bitsequence_builder * bmb = new static_bitsequence_builder_brw32(20);\r
//static_permutation_builder * pmb = new static_permutation_builder_mrrr(PERM_SAMPLE, bmb);\r
//static_sequence_builder * ssb = new static_sequence_builder_gmr_chunk(bmb, pmb);\r
//static_bitsequence_builder * bmb = new static_bitsequence_builder_brw32(20);\r
//static_permutation_builder * pmb = new static_permutation_builder_mrrr(PERM_SAMPLE, bmb);\r
//static_sequence_builder * ssb = new static_sequence_builder_gmr_chunk(bmb, pmb);\r
- static_bitsequence_builder * bmb = new static_bitsequence_builder_brw32(20);\r
+ static_bitsequence_builder * bmb = new static_bitsequence_builder_sdarray();\r
alphabet_mapper *am = new alphabet_mapper_none();\r
alphabet_mapper *am = new alphabet_mapper_none();\r
- wt_coder * wc = new wt_coder_huff((uint*)tags_aux,npar,am);\r
- Tags = new static_sequence_wvtree((uint*)tags_aux,npar,wc ,bmb, am);\r
+ //wt_coder * wc = new wt_coder_huff((uint*)tags_aux,npar,am);\r
+ //Tags = new static_sequence_wvtree((uint*)tags_aux,npar,wc ,bmb, am);\r
//Tags = new static_sequence_gmr((uint *) tags_aux, (uint) npar,ntagsize, bmb, ssb);\r
//Tags = new static_sequence_gmr((uint *) tags_aux, (uint) npar,ntagsize, bmb, ssb);\r
+ Tags = new static_sequence_bs((uint*)tags_aux,npar,am,bmb);\r
\r
cout << "Tags test: " << Tags->test((uint*)tags_aux,npar) << endl;\r
\r
\r
cout << "Tags test: " << Tags->test((uint*)tags_aux,npar) << endl;\r
\r
for(uint i=0;i<n;i++)
max_v = max(max_v,symb[i]);
uint * occ = new uint[max_v+1];
for(uint i=0;i<n;i++)
max_v = max(max_v,symb[i]);
uint * occ = new uint[max_v+1];
- for(uint i=0;i<max_v+1;i++)
+ for(uint i=0;i<(uint)max_v+1;i++)
occ[i] = 0;
for(uint i=0;i<n;i++)
occ[symb[i]]++;
occ[i] = 0;
for(uint i=0;i<n;i++)
occ[symb[i]]++;
for(uint i=0;i<n;i++) {
uchar c;
for(uint i=0;i<n;i++) {
uchar c;
- fread(&c,sizeof(uchar),1,fp);
+ text[i] = fread(&c,sizeof(uchar),1,fp);
text[i] = (uint)c;
}
fclose(fp);
text[i] = (uint)c;
}
fclose(fp);
- fwrite(text,sizeof(uint),n,out);
+ n = fwrite(text,sizeof(uint),n,out);
fclose(out);
delete [] text;
fclose(out);
delete [] text;