Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Romain De Laage De Bellefaye
LO21-projet
Commits
f46b8758
Commit
f46b8758
authored
May 15, 2021
by
Luning Yang
Browse files
Update voisinage.cpp
parent
20b04097
Changes
1
Hide whitespace changes
Inline
Side-by-side
Voisinage/voisinage.cpp
View file @
f46b8758
#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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment