Skip to content
Snippets Groups Projects
Commit 3aadc6e2 authored by timeo's avatar timeo
Browse files

modification du calcul d'amplitude pour la taille de l'alphabet

parent 4cff26c8
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ string fichier;
int32_t* sommeAdditiveArray;
SuffixTree *arbre;
int32_t maxi = 0;
int32_t mini = 0;
void parseFile(string namefile) // Enregitrement du fichier dans une variable
......@@ -77,8 +78,14 @@ void sommeAdditiveCentre(){
}
compteur += nb;
sommeAdditiveArray[i+1] = compteur;
if (compteur > maxi){
maxi = compteur;
}
if (compteur < mini){
mini = compteur;
}
}
maxi = fichier.size() + 10;
}
/**
* Retourne la valeur d'un bloc en faisant le calcul par la somme additive.
......@@ -312,7 +319,7 @@ void ecrireSommeCentre(){
int main(){
parseFile("testfiles/ACF_70880000_over_0123.txt");
sommeAdditiveCentre();
sommeAdditive();
// ecrireSommeCentre();
int32_t* T = new int32_t[fichier.size() + 1];
......@@ -322,7 +329,8 @@ int main(){
int32_t fs = 000;
int32_t* SA = new int32_t[fichier.size() + fs + 1];
int32_t k = 2;
int32_t k = maxi - mini;
std::cout << "k : " << k << " maxi : " << maxi << " mini : " << mini << std::endl;
std::cout << libsais_int(T, SA, 70880000, k, fs) << std::endl;
// free(T);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment