[mlpack-git] [mlpack/mlpack] Spill trees (#747)
notifications at github.com
Sun Aug 14 16:50:13 EDT 2016
> + // better, then take it.
> + if (SortPolicy::IsBetter(queryNode.Parent()->Stat().FirstBound(),
> + worstDistance))
> + worstDistance = queryNode.Parent()->Stat().FirstBound();
> + }
> + // Could the existing bounds be better?
> + if (SortPolicy::IsBetter(queryNode.Stat().FirstBound(), worstDistance))
> + worstDistance = queryNode.Stat().FirstBound();
> + // Cache bounds for later.
> + queryNode.Stat().FirstBound() = worstDistance;
> + worstDistance = SortPolicy::Relax(worstDistance, epsilon);
> + return worstDistance;
I believe that `CalculateBound()` is the only function that needs to be changed in the rules class; is that right? Maybe it is better to use some standalone static method to calculate the bound for spill trees, and then something like this in `NeighborSearchRules::CalculateBound()`:
If there are other things that differ in this class, too, it might be necessary to use this same trick there. I see this kind of as a variant of the `#ifdef` style of making things compatible, so it's kind of hackish, but I think maybe it is better than replicating the entire class in order to change only a little functionality. What do you think?
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlpack-git