[mlpack-git] [mlpack/mlpack] CNE algorithm (#753)

Marcus Edel notifications at github.com
Sun Aug 7 10:58:12 EDT 2016


> +  return dist(rng);
> +  
> +}
> +
> +// Return a random float between [x, y]
> +double RandFloat(double x, double y) {
> +  boost::random::uniform_real_distribution<> dist(x, y);
> +  return dist(rng);
> +}
> +
> +/**
> + * Definitions of other functions.
> + */
> +
> +// Return the sign of a number.
> +template <typename T> int sgn(T val) {

What about using ``arma::sign(val)`` take a look at: http://arma.sourceforge.net/docs.html#misc_fns for more informations.

---
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/753/files/10b99ab5c6e8d2836d231fa60a898cc03f7d9192#r73803338
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160807/e1aba017/attachment.html>


More information about the mlpack-git mailing list