[mlpack-git] master, mlpack-1.0.x: readability changes to BinarySpaceTree::FurthestPointDistance() (e5b360d)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:47:16 EST 2015
Repository : https://github.com/mlpack/mlpack
On branches: master,mlpack-1.0.x
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit e5b360d755dcd98b03a119ab521df84e3c23bc45
Author: andrewmw94 <andrewmw94 at gmail.com>
Date: Tue May 20 19:18:33 2014 +0000
readability changes to BinarySpaceTree::FurthestPointDistance()
>---------------------------------------------------------------
e5b360d755dcd98b03a119ab521df84e3c23bc45
src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp b/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
index d9e9735..9aa3883 100644
--- a/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
@@ -441,9 +441,8 @@ inline double BinarySpaceTree<BoundType, StatisticType, MatType, SplitType>::
if (!IsLeaf())
return 0.0;
- // Otherwise half of the maximum bound distance is sufficient (this is the
- // distance from a corner of the bound to the centroid).
- return 0.5 * bound.MaxDistance(bound);
+ // Otherwise return the distance from a corner of the bound to the centroid.
+ return 0.5 * bound.Diameter();
}
/**
More information about the mlpack-git
mailing list