[mlpack-git] master: Better handling for arbitrary types. (ac46f5b)
gitdub at mlpack.org
gitdub at mlpack.org
Mon Mar 7 14:59:45 EST 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/f45c17bc4d70ee5d82bf11a91850a34b814eccff...a69871c4eb63087c825502fd2277565453720568
>---------------------------------------------------------------
commit ac46f5bc1f8f426dd08a61b6cbd3a6f90ca05cd7
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Jan 25 21:54:08 2016 +0000
Better handling for arbitrary types.
>---------------------------------------------------------------
ac46f5bc1f8f426dd08a61b6cbd3a6f90ca05cd7
src/mlpack/core/math/range_impl.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mlpack/core/math/range_impl.hpp b/src/mlpack/core/math/range_impl.hpp
index 686625e..c53235d 100644
--- a/src/mlpack/core/math/range_impl.hpp
+++ b/src/mlpack/core/math/range_impl.hpp
@@ -18,7 +18,8 @@ namespace math {
*/
template<typename T>
inline RangeType<T>::RangeType() :
- lo(DBL_MAX), hi(-DBL_MAX) { /* nothing else to do */ }
+ lo(std::numeric_limits<T>::max()),
+ hi(-std::numeric_limits<T>::max()) { /* nothing else to do */ }
/**
* Initialize a range to enclose only the given point.
More information about the mlpack-git
mailing list