[mlpack-git] [mlpack] Error Compiling Triangular_kernel.hpp on Windows (#422)

Joseph Mariadassou notifications at github.com
Fri Mar 20 03:33:38 EDT 2015


In triangular_kernel.hpp (line 657) the following function fails to compile as it is using the max macro from a windows header. 
 double Evaluate(const double distance) const
  {
    return std::max(0.0, (1 - distance) / bandwidth);
  }

The workaround is to add
#ifdef max
#undef max
#endif
close to the top of the file


---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/422
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150320/4fdc9130/attachment.html>


More information about the mlpack-git mailing list