[mlpack] 07/324: readability changes to BinarySpaceTree::FurthestPointDistance()
Barak A. Pearlmutter
barak+git at cs.nuim.ie
Sun Aug 17 08:21:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch svn-trunk
in repository mlpack.
commit 087ae7086e154226d85649670cb67b0ad41aca63
Author: andrewmw94 <andrewmw94 at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date: Tue May 20 19:18:33 2014 +0000
readability changes to BinarySpaceTree::FurthestPointDistance()
git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16525 9d5b8971-822b-0410-80eb-d18c1038ef23
---
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();
}
/**
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list