Corr. syntaxe dans server.cc
server.cc : Ajout d'infos de débogage et correction erreur de syntaxe (de Fred le mauvais muhaha). git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@34 785a6c6c-259e-4ff1-8b91-dc31627914f0
This commit is contained in:
parent
cbe71f0004
commit
1df1eb075a
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#define TEST
|
#define TEST
|
||||||
#define DEBUG // Décommenter pour avoir de l'affichage en plus.
|
#define DEBUG // Décommenter pour avoir de l'affichage en plus.
|
||||||
//#define DEBUG_2 // Décommenter pour avoir encore plus d'affichage.
|
#define DEBUG_2 // Décommenter pour avoir encore plus d'affichage.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -372,6 +372,10 @@ vector<Point> Server::getkClosestInSs(const vector<Measurement> &m, const unsign
|
||||||
if (point_ignored == NULL || (reference_point_list[i].getCoordinates() != *point_ignored))
|
if (point_ignored == NULL || (reference_point_list[i].getCoordinates() != *point_ignored))
|
||||||
{
|
{
|
||||||
tmp_distance = reference_point_list[i].getSsSquareDistance(m);
|
tmp_distance = reference_point_list[i].getSsSquareDistance(m);
|
||||||
|
#ifdef DEBUG_2
|
||||||
|
cout << tmp_distance << " " ;
|
||||||
|
#endif // DEBUG_2
|
||||||
|
|
||||||
/* if not k points, add it */
|
/* if not k points, add it */
|
||||||
if(distances_vector.size() < k)
|
if(distances_vector.size() < k)
|
||||||
{
|
{
|
||||||
|
@ -388,7 +392,7 @@ vector<Point> Server::getkClosestInSs(const vector<Measurement> &m, const unsign
|
||||||
for (j = 0 ; j < distances_vector.size() ; j++)
|
for (j = 0 ; j < distances_vector.size() ; j++)
|
||||||
if (distances_vector[j] == dist_max)
|
if (distances_vector[j] == dist_max)
|
||||||
{
|
{
|
||||||
distance_vector[j] = tmp_distance;
|
distances_vector[j] = tmp_distance;
|
||||||
points_vector[j] = reference_point_list[i].getCoordinates();
|
points_vector[j] = reference_point_list[i].getCoordinates();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -401,6 +405,9 @@ vector<Point> Server::getkClosestInSs(const vector<Measurement> &m, const unsign
|
||||||
/* Else nothing needs to be done */
|
/* Else nothing needs to be done */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_2
|
||||||
|
cout << endl ;
|
||||||
|
#endif // DEBUG_2
|
||||||
|
|
||||||
/* Sorts the vector */
|
/* Sorts the vector */
|
||||||
for (i = 0 ; i < distances_vector.size() - 1 ; i++)
|
for (i = 0 ; i < distances_vector.size() - 1 ; i++)
|
||||||
|
|
Loading…
Reference in New Issue