Commit eee750a7 authored by Cassio Kirch's avatar Cassio Kirch
Browse files

STEPS + 1 steps.

parent 0547ec33
...@@ -27,8 +27,9 @@ getAverageNeighborsNo(const struct Boid* const boid) ...@@ -27,8 +27,9 @@ getAverageNeighborsNo(const struct Boid* const boid)
unsigned int boidCount; unsigned int boidCount;
double averageNeighborsNo = 0.0; double averageNeighborsNo = 0.0;
for (boidCount = 0; boidCount < N; ++boidCount) for (boidCount = 0; boidCount < N; ++boidCount)
averageNeighborsNo += (double)(boid[boidCount].endoNeighbors + \ averageNeighborsNo += ((double)boid[boidCount].endoNeighbors + \
boid[boidCount].ectoNeighbors) / N; (double)boid[boidCount].ectoNeighbors);
averageNeighborsNo /= N;
return averageNeighborsNo; return averageNeighborsNo;
} }
#endif #endif
...@@ -139,7 +140,7 @@ one_system () ...@@ -139,7 +140,7 @@ one_system ()
for (boidCount=0; boidCount<N; boidCount++) for (boidCount=0; boidCount<N; boidCount++)
appendBoid(&(boid[boidCount]), box); appendBoid(&(boid[boidCount]), box);
for (step=0; step<STEPS; ++step) for (step=0; step <= STEPS; ++step)
{ {
nextStep(parameters); nextStep(parameters);
for (boidCount=0; boidCount<N; boidCount++) for (boidCount=0; boidCount<N; boidCount++)
......
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