[mlpack-git] [mlpack/mlpack] General greedy traverser. (#762)

MarcosPividori notifications at github.com
Fri Aug 19 14:52:47 EDT 2016


> @@ -309,14 +412,21 @@ class NeighborSearch
>    //! Return the number of node combination scores during the last search.
>    size_t Scores() const { return scores; }
>  
> +  //! Access the search mode.
> +  NeighborSearchMode SearchMode() const { return searchMode; }
> +  //! Modify the search mode.
> +  void SetSearchMode(const NeighborSearchMode mode);

@rcurtin  Yes, I agree that it is preferable to have: `NeighborSearchMode& SearchMode()`
Suppose I add that method, the problem it this:
Until mlpack 3.0.0, we have the modifiers: `Naive()` and `SingleMode()`.
So, 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.
Because of that I decided to include a  member `SetSearchMode()`.
One solution I can think, I am not sure if this is what you suggested, is to include the modifier `SearchMode()` and a comment like:
"Untile mlpack 3.0.0, if you modify the SearchMode, you also have to modify the flags Naive() and SingleMode()"
What do you think?
Thanks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/762/files/f8ddd58ece06362024944a6533f68074a6b27ef7#r75533974
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160819/ab31c7e0/attachment-0001.html>


More information about the mlpack-git mailing list