[mlpack-git] [mlpack/mlpack] R+ and R++ trees implementation (#699)

Ryan Curtin notifications at github.com
Wed Jun 29 16:04:31 EDT 2016


> +    SweepCostType cost;
> +
> +    if (node->IsLeaf())
> +      cost = SweepType<SplitPolicyType>::SweepLeafNode(k, node, cut);
> +    else
> +      cost = SweepType<SplitPolicyType>::SweepNonLeafNode(k, node, cut);
> +    
> +
> +    if (cost < minCost)
> +    {
> +      minCost = cost;
> +      minCutAxis = k;
> +      minCut = cut;      
> +    }
> +  }
> +  return true;

What happens if every call to `SweepLeafNode()` or `SweepNonLeafNode` returns `std::numeric_limits<SweepCostType>::max()`?  Then `minCutAxis` will be the invalid `node->Bound().Dim()`.  It seems like maybe in that case we should return false.

---
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/699/files/e165d759f9ae612b9965f70fbbf8abdb19dc8d07#r69016947
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160629/60d1582f/attachment.html>


More information about the mlpack-git mailing list