<p>In <a href="https://github.com/mlpack/mlpack/pull/684#discussion_r67283371">src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort.hpp</a>:</p>
<pre style='color:#555'>> @@ -150,6 +150,21 @@ class NearestNeighborSort
> return DBL_MAX;
> return a + b;
> }
> +
> + /**
> + * Return the given value relaxed.
> + *
> + * @param value Value to relax.
> + * @param epsilon Relative error (non-negative).
> + *
> + * @return double Value relaxed.
> + */
> + static inline double Relax(const double value, const double epsilon)
> + {
> + if (value == DBL_MAX)
> + return DBL_MAX;
> + return (1 / (1 + epsilon)) * value;
</pre>
<p>Thanks, I was finished in <a href="https://github.com/mlpack/mlpack/commit/aebc529bb8c016ad17f46211a8a4aafa8c10a303" class="commit-link"><tt>aebc529</tt></a> and <a href="https://github.com/mlpack/mlpack/commit/d742f92f06a4efd0eee703ba1fa212d09961af17" class="commit-link"><tt>d742f92</tt></a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/684/files/07879a2cc79b35b10d7fae687d6e27ad90a9f2d7#r67283371">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFJUfveEfEFDdZ03r9E-8avee7-Hgks5qMMZMgaJpZM4IvhJu">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNUkueV2gxGBKJ7__e7WhJbLrMd5ks5qMMZMgaJpZM4IvhJu.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/684/files/07879a2cc79b35b10d7fae687d6e27ad90a9f2d7#r67283371"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>