[mlpack-git] [mlpack/mlpack] Spill trees (#747)

Ryan Curtin notifications at github.com
Sun Aug 14 17:54:12 EDT 2016


> +    arma::Mat<size_t> neighborsSPTree;
> +    arma::mat distancesSPTree;
> +
> +    for (size_t mode = 0; mode < 2; mode++)
> +    {
> +      switch (mode)
> +      {
> +        case 0: // Single Tree Search.
> +          spTreeSearch.Naive() = false;
> +          spTreeSearch.SingleMode() = true;
> +          break;
> +        case 1: // Dual Tree Search.
> +          spTreeSearch.Naive() = false;
> +          spTreeSearch.SingleMode() = false;
> +          break;
> +      }

You could simplify:

```
spTreeSearch.SingleMode() = (mode == 0);
```

I don't think setting `Naive()` is necessary.

-- 
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/747/files/fe090ee13c7cad79e2b7eb8b6690628ba3ead1ed#r74709312
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160814/ad539c68/attachment.html>


More information about the mlpack-git mailing list