[mlpack-git] master: Further fixes for new TreeType API. typedef.hpp needs better comments. (7662ee3)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Jul 29 16:41:54 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/f8ceffae0613b350f4d6bdd46c6c8633a40b4897...6ee21879488fe98612a4619b17f8b51e8da5215b
>---------------------------------------------------------------
commit 7662ee3ffaf66749a662f07b62ba04dae17b5c26
Author: ryan <ryan at ratml.org>
Date: Wed Jul 22 23:21:28 2015 -0400
Further fixes for new TreeType API.
typedef.hpp needs better comments.
>---------------------------------------------------------------
7662ee3ffaf66749a662f07b62ba04dae17b5c26
src/mlpack/core/tree/binary_space_tree.hpp | 1 +
.../tree/binary_space_tree/binary_space_tree_impl.hpp | 4 ++--
src/mlpack/core/tree/binary_space_tree/typedef.hpp | 16 ++++++++--------
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/mlpack/core/tree/binary_space_tree.hpp b/src/mlpack/core/tree/binary_space_tree.hpp
index 17dea28..146b9bb 100644
--- a/src/mlpack/core/tree/binary_space_tree.hpp
+++ b/src/mlpack/core/tree/binary_space_tree.hpp
@@ -19,5 +19,6 @@
#include "binary_space_tree/breadth_first_dual_tree_traverser.hpp"
#include "binary_space_tree/breadth_first_dual_tree_traverser_impl.hpp"
#include "binary_space_tree/traits.hpp"
+#include "binary_space_tree/typedef.hpp"
#endif
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 8d0de01..76a6bc6 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
@@ -575,8 +575,8 @@ SplitNode(std::vector<size_t>& oldFromNew,
left->Center(leftCenter);
right->Center(rightCenter);
- const double leftParentDistance = bound.Metric().Evaluate(center, leftCenter);
- const double rightParentDistance = bound.Metric().Evaluate(center,
+ const double leftParentDistance = MetricType::Evaluate(center, leftCenter);
+ const double rightParentDistance = MetricType::Evaluate(center,
rightCenter);
left->ParentDistance() = leftParentDistance;
diff --git a/src/mlpack/core/tree/binary_space_tree/typedef.hpp b/src/mlpack/core/tree/binary_space_tree/typedef.hpp
index 639fff0..a787415 100644
--- a/src/mlpack/core/tree/binary_space_tree/typedef.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/typedef.hpp
@@ -21,8 +21,8 @@ template<typename MetricType, typename StatisticType, typename MatType>
using KDTree = BinarySpaceTree<MetricType,
StatisticType,
MatType,
- HRectBound<MetricType>,
- MidpointSplit<BoundType, MetricType>>;
+ bound::HRectBound,
+ MidpointSplit>;
/**
* mean split kd-tree
@@ -31,8 +31,8 @@ template<typename MetricType, typename StatisticType, typename MatType>
using MeanSplitKDTree = BinarySpaceTree<MetricType,
StatisticType,
MatType,
- HRectBound<MetricType>,
- MeanSplit<BoundType, MetricType>>;
+ bound::HRectBound,
+ MeanSplit>;
/**
* midpoint split ball tree
@@ -41,8 +41,8 @@ template<typename MetricType, typename StatisticType, typename MatType>
using BallTree = BinarySpaceTree<MetricType,
StatisticType,
MatType,
- HRectBound<MetricType>,
- MidpointSplit<BoundType, MetricType>>;
+ bound::HRectBound,
+ MidpointSplit>;
/**
* mean split ball tree
@@ -51,8 +51,8 @@ template<typename MetricType, typename StatisticType, typename MatType>
using MeanSplitBallTree = BinarySpaceTree<MetricType,
StatisticType,
MatType,
- HRectBound<MetricType>,
- MeanSplit<BoundType, MetricType>>;
+ bound::HRectBound,
+ MeanSplit>;
} // namespace tree
} // namespace mlpack
More information about the mlpack-git
mailing list