[mlpack-git] [mlpack/mlpack] Fixed an error in MidpointSplit that may lead to a segfault (#741)

Ryan Curtin notifications at github.com
Wed Jul 27 11:28:00 EDT 2016


>        }
>      }
>  
>      delete[] ranges;
>    }
>  
> +  assert(splitVal != DBL_MAX);
> +
>    if (maxWidth == 0) // All these points are the same.  We can't split.
>      return false;

Hm, I think we could avoid the assert here (or handle it better) if we just made the conditional `if (maxWidth <= 0)`; what do you think?  Then no split would be performed.

---
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/741/files/a659b90e57931d0377167cb980602ed565b44536#r72461768
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160727/900d32bc/attachment.html>


More information about the mlpack-git mailing list