You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inline bool addPoint(DistanceType dist, IndexType index) {
CountType i;
for (i = count; i > 0; --i) {
#ifdef NANOFLANN_FIRST_MATCH // If defined and two points have the same
// distance, the one with the lowest-index will be
// returned first.
if ((dists[i - 1] > dist) ||
((dist == dists[i - 1]) && (indices[i - 1] > index))) {
#else
if (dists[i - 1] > dist) {
#endif
if (i < capacity) {
dists[i] = dists[i - 1];
indices[i] = indices[i - 1];
}
} else
break;
}
if (i < capacity) {
dists[i] = dist;
indices[i] = index;
}
if (count < capacity)
count++;
// tell caller that the search shall continue
return false;
// return true;
}
if i turn it to false, time cost reduced , but result poor, but if it to true, result quality going up but time cost increased.
can you explain why??
The text was updated successfully, but these errors were encountered:
inline bool addPoint(DistanceType dist, IndexType index) {
CountType i;
for (i = count; i > 0; --i) {
#ifdef NANOFLANN_FIRST_MATCH // If defined and two points have the same
// distance, the one with the lowest-index will be
// returned first.
if ((dists[i - 1] > dist) ||
((dist == dists[i - 1]) && (indices[i - 1] > index))) {
#else
if (dists[i - 1] > dist) {
#endif
if (i < capacity) {
dists[i] = dists[i - 1];
indices[i] = indices[i - 1];
}
} else
break;
}
if (i < capacity) {
dists[i] = dist;
indices[i] = index;
}
if (count < capacity)
count++;
}
if i turn it to false, time cost reduced , but result poor, but if it to true, result quality going up but time cost increased.
can you explain why??
The text was updated successfully, but these errors were encountered: