<p>In <a href="https://github.com/mlpack/mlpack/pull/762#discussion_r75533974">src/mlpack/methods/neighbor_search/neighbor_search.hpp</a>:</p>
<pre style='color:#555'>&gt; @@ -309,14 +412,21 @@ class NeighborSearch
&gt;    //! Return the number of node combination scores during the last search.
&gt;    size_t Scores() const { return scores; }
&gt;  
&gt; +  //! Access the search mode.
&gt; +  NeighborSearchMode SearchMode() const { return searchMode; }
&gt; +  //! Modify the search mode.
&gt; +  void SetSearchMode(const NeighborSearchMode mode);
</pre>
<p><a href="https://github.com/rcurtin" class="user-mention">@rcurtin</a>  Yes, I agree that it is preferable to have: <code>NeighborSearchMode&amp; SearchMode()</code><br>
Suppose I add that method, the problem it this:<br>
Until mlpack 3.0.0, we have the modifiers: <code>Naive()</code> and <code>SingleMode()</code>.<br>
So, when a method is called, and I see a difference between the booleans values: <code>naive</code> and <code>singleMode</code> and the member <code>searchMode</code> (for example: <code>naive == true</code> , <code>singleMode == false</code> , <code>searchMode == DUAL_TREE_MODE</code> ) we don't know which fields were modified, the boolean flags <code>naive</code> and <code>singleMode</code>, or the <code>searchMode</code> member.  So, I don't know if the user want to do naive search or dual tree search.<br>
Because of that I decided to include a  member <code>SetSearchMode()</code>.<br>
One solution I can think, I am not sure if this is what you suggested, is to include the modifier <code>SearchMode()</code> and a comment like:<br>
"Untile mlpack 3.0.0, if you modify the SearchMode, you also have to modify the flags Naive() and SingleMode()"<br>
What do you think?<br>
Thanks!</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<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/762/files/f8ddd58ece06362024944a6533f68074a6b27ef7#r75533974">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFCsdF9BECppLfVhuvtjGtJYrKq6Jks5qhft_gaJpZM4JlKcS">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCFNnYLkTSlk7RwsKh_0HSD5LrNzks5qhft_gaJpZM4JlKcS.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/762/files/f8ddd58ece06362024944a6533f68074a6b27ef7#r75533974"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/mlpack/mlpack","title":"mlpack/mlpack","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/mlpack/mlpack"}},"updates":{"snippets":[{"icon":"PERSON","message":"@MarcosPividori in #762: @rcurtin  Yes, I agree that it is preferable to have: `NeighborSearchMode\u0026 SearchMode()`\r\nSuppose I add that method, the problem it this:\r\nUntil mlpack 3.0.0, we have the modifiers: `Naive()` and `SingleMode()`.\r\nSo, when a method is called, and I see a difference between the booleans values: `naive` and `singleMode` and the member `searchMode` (for example: `naive == true` , `singleMode == false` , `searchMode == DUAL_TREE_MODE` ) we don't know which fields were modified, the boolean flags `naive` and `singleMode`, or the `searchMode` member.  So, I don't know if the user want to do naive search or dual tree search.\r\nBecause of that I decided to include a  member `SetSearchMode()`.\r\nOne solution I can think, I am not sure if this is what you suggested, is to include the modifier `SearchMode()` and a comment like:\r\n\"Untile mlpack 3.0.0, if you modify the SearchMode, you also have to modify the flags Naive() and SingleMode()\"\r\nWhat do you think?\r\nThanks!"}],"action":{"name":"View Pull Request","url":"https://github.com/mlpack/mlpack/pull/762/files/f8ddd58ece06362024944a6533f68074a6b27ef7#r75533974"}}}</script>