Skip to content
GitLab
Menu
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
1aed061d
Verified
Commit
1aed061d
authored
Jun 11, 2021
by
Romain De Laage De Bellefaye
🌳
Browse files
Bad conditions in neighbourhood compute
parent
41ef81d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/voisinage.cpp
View file @
1aed061d
...
...
@@ -12,7 +12,7 @@ void RegleVoisinageNeumann::calculVoisinage(Voisinage& v, const Reseau& r) const
for
(
int
i
=
-
static_cast
<
int
>
(
rayon
);
i
<=
static_cast
<
int
>
(
rayon
);
i
++
)
for
(
int
j
=
-
static_cast
<
int
>
(
rayon
);
j
<=
static_cast
<
int
>
(
rayon
);
j
++
)
if
(
abs
(
i
)
+
abs
(
j
)
<=
static_cast
<
int
>
(
rayon
)
&&
i
!=
0
&&
j
!=
0
)
if
(
abs
(
i
)
+
abs
(
j
)
<=
static_cast
<
int
>
(
rayon
)
&&
(
i
!=
0
||
j
!=
0
)
)
{
int
x
=
(
cellY
+
i
)
%
hauteur
;
if
(
x
<
0
)
...
...
@@ -33,7 +33,7 @@ void RegleVoisinageMoore::calculVoisinage(Voisinage& v, const Reseau& r) const {
for
(
int
i
=
-
static_cast
<
int
>
(
rayon
);
i
<=
static_cast
<
int
>
(
rayon
);
i
++
)
for
(
int
j
=
-
static_cast
<
int
>
(
rayon
);
j
<=
static_cast
<
int
>
(
rayon
);
j
++
)
if
(
abs
(
i
)
<=
static_cast
<
int
>
(
rayon
)
&&
abs
(
j
)
<=
static_cast
<
int
>
(
rayon
)
&&
i
!=
0
&&
j
!=
0
)
if
(
i
!=
0
||
j
!=
0
)
{
int
x
=
(
cellY
+
i
)
%
hauteur
;
if
(
x
<
0
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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