[mlpack-git] [mlpack/mlpack] Spill trees (#747)
notifications at github.com
Wed Aug 17 00:25:23 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;
Ah, I didn't mean use `#ifdef` directly, I just meant that the idea of using standalone functions with template specializations feels kinda hackish, in the same way that `#ifdef`s feel kinda hackish.
My thought here is that someone who is new to this code and wants to understand it will come along and get overwhelmed the more files they see (or, really, the more complexity that they perceive). So in that sense, sometimes I think it is better to call out to simple standalone functions. In this case, using template specializations for those would help identify specifically what in the calculation is different. 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