1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
for( std::map<std::string, std::string>::iterator it1 = SitesDifferentsDonnes.begin(); it1 != SitesDifferentsDonnes.end(); ++it1){ //itterer sur Couple_De_Famille
for(std::map<std::string, std::string>::iterator it1compare = SitesDifferentsDonnes.begin(); it1compare != SitesDifferentsDonnes.end(); ++it1compare){ //Itterer sur espece;
int l = it1->second.length () ;
int l2 = it1compare->second.length () ;
if (l != l2)
throw ("Les chaines à comparer ne sont pas égales !") ;
std::ostringstream mespositions;
for (int i = 1 ; i < l ; ++i)
{
std::ostringstream GeneComparees;
if (it1->first != it1compare->first)
GeneComparees << it1->first << "_" << it1compare->first;
if (it1->second[i] != it1compare->second[i]) {
mespositions << " " <<i;
}
SitesDifferents [GeneComparees.str()] = mespositions.str() ;
}
}
}
return(SitesDifferents);
} |