Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit e00046db by Basile Sauvage

### deuxieme algo voronoi centroidaux

parent 7acfd5c2
 ... @@ -219,7 +219,6 @@ void CentroidalVoronoiDiagram::cumulateEnergyOnPaths(){ ... @@ -219,7 +219,6 @@ void CentroidalVoronoiDiagram::cumulateEnergyOnPaths(){ template template unsigned int CentroidalVoronoiDiagram::moveSeeds(){ unsigned int CentroidalVoronoiDiagram::moveSeeds(){ // TODO : je pense qu'il y a un bug : ça devrait convergerger bien mieux en n'utilisant que l'energie globale comme critere d'arret unsigned int m = 0; unsigned int m = 0; globalEnergy = 0.0; globalEnergy = 0.0; for (unsigned int i = 0; i < this->seeds.size(); i++) for (unsigned int i = 0; i < this->seeds.size(); i++) ... @@ -231,6 +230,30 @@ unsigned int CentroidalVoronoiDiagram::moveSeeds(){ ... @@ -231,6 +230,30 @@ unsigned int CentroidalVoronoiDiagram::moveSeeds(){ return m; return m; } } template unsigned int CentroidalVoronoiDiagram::moveSeeds2(){ unsigned int m = 0; globalEnergy = 0.0; for (unsigned int i = 0; i < this->seeds.size(); i++) { Dart oldSeed = this->seeds[i]; int r = moveSeed(i); Dart newSeed = this->seeds[i]; globalEnergy += distances[oldSeed]; REAL regionEnergy = distances[oldSeed]; if (r==1) { this->computeDistancesWithinRegion(newSeed); cumulateEnergyFromRoot(newSeed); if (distances[newSeed] < regionEnergy) m+=1; else this->seeds[i] = oldSeed; } } return m; } template template typename PFP::REAL CentroidalVoronoiDiagram::cumulateEnergyFromRoot(Dart e){ typename PFP::REAL CentroidalVoronoiDiagram::cumulateEnergyFromRoot(Dart e){ REAL distArea = areaElts[e] * distances[e]; REAL distArea = areaElts[e] * distances[e]; ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!