[mlpack-git] master: Removed an unnecessary assertion. (fec48f7)
gitdub at mlpack.org
gitdub at mlpack.org
Wed Jul 27 11:32:55 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/3a1bc90ea5f1ffa45d2de000efb4429c60468b21...ef51b032f275266f781d42b9bd0aa50aa26a3077
>---------------------------------------------------------------
commit fec48f7c6f1975d54010397da3f6673559ffd1fd
Author: Mikhail Lozhnikov <lozhnikovma at gmail.com>
Date: Wed Jul 27 18:32:55 2016 +0300
Removed an unnecessary assertion.
>---------------------------------------------------------------
fec48f7c6f1975d54010397da3f6673559ffd1fd
src/mlpack/core/tree/binary_space_tree/midpoint_split_impl.hpp | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/mlpack/core/tree/binary_space_tree/midpoint_split_impl.hpp b/src/mlpack/core/tree/binary_space_tree/midpoint_split_impl.hpp
index 1aa16b3..28dc707 100644
--- a/src/mlpack/core/tree/binary_space_tree/midpoint_split_impl.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/midpoint_split_impl.hpp
@@ -78,9 +78,7 @@ bool MidpointSplit<BoundType, MatType>::SplitNode(const BoundType& bound,
delete[] ranges;
}
- assert(splitVal != DBL_MAX);
-
- if (maxWidth == 0) // All these points are the same. We can't split.
+ if (maxWidth <= 0) // All these points are the same. We can't split.
return false;
// Perform the actual splitting. This will order the dataset such that points
@@ -157,9 +155,7 @@ bool MidpointSplit<BoundType, MatType>::SplitNode(const BoundType& bound,
delete[] ranges;
}
- assert(splitVal != DBL_MAX);
-
- if (maxWidth == 0) // All these points are the same. We can't split.
+ if (maxWidth <= 0) // All these points are the same. We can't split.
return false;
// Perform the actual splitting. This will order the dataset such that points
More information about the mlpack-git
mailing list