Commit f46b8758 authored by Luning Yang's avatar Luning Yang
Browse files

Update voisinage.cpp

parent 20b04097
#include <Voisinage_voisinage.hpp>
#include<math.h>
Voisinage::void setr(unsigned int rayon){
int rayon = -1;
while (rayon < 0){
printf("Entrez le ratonde voisinage (0 pour le voisinage arbitraire):\n ");
scanf("%d", &rayon);
if(rayon >= 0){
r = rayon;
}
else printf("Rayon incorrect !\n");
}
}
void RegleVoisinage::setNbVoisins(unsigned int r) {
if (r == 0) { //voisinage arbitraire
printf("Entrez le nombre de voisins.\n");
......@@ -170,7 +185,7 @@ void RegleVoisinageMoore::calculVoisinage(Voisinage& v, const Reseau& r){
}
Voisinage::~Voisinage() {
VoisinageIterator* cellules(this);
VoisinageIterator *cellules = voisins.creerIterator();
cellules.first();
int nb = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment