[mlpack-git] master: Refactor to handle new HRectBound API. (e61252a)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Jul 29 16:41:57 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/f8ceffae0613b350f4d6bdd46c6c8633a40b4897...6ee21879488fe98612a4619b17f8b51e8da5215b
>---------------------------------------------------------------
commit e61252af97717323485454527f67010ecdf967a4
Author: ryan <ryan at ratml.org>
Date: Wed Jul 22 22:08:08 2015 -0400
Refactor to handle new HRectBound API.
>---------------------------------------------------------------
e61252af97717323485454527f67010ecdf967a4
src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp | 12 ++++++------
src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
index 6f703a5..9f67334 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
@@ -82,7 +82,7 @@ class RectangleTree
//! The minimum leaf size.
size_t minLeafSize;
//! The bound object for this node.
- HRectBound<> bound;
+ HRectBound<EuclideanDistance> bound;
//! Any extra data contained in the node.
StatisticType stat;
//! A struct to store the "split history" for X trees.
@@ -260,9 +260,9 @@ class RectangleTree
RectangleTree* FindByBeginCount(size_t begin, size_t count);
//! Return the bound object for this node.
- const HRectBound<>& Bound() const { return bound; }
+ const HRectBound<EuclideanDistance>& Bound() const { return bound; }
//! Modify the bound object for this node.
- HRectBound<>& Bound() { return bound; }
+ HRectBound<EuclideanDistance>& Bound() { return bound; }
//! Return the statistic object for this node.
const StatisticType& Stat() const { return stat; }
@@ -318,7 +318,7 @@ class RectangleTree
MatType& LocalDataset() { return *localDataset; }
//! Get the metric which the tree uses.
- typename HRectBound<>::MetricType Metric() const { return bound.Metric(); }
+ EuclideanDistance Metric() const { return EuclideanDistance(); }
//! Get the centroid of the node and store it in the given vector.
void Center(arma::vec& center) { bound.Center(center); }
@@ -488,7 +488,7 @@ class RectangleTree
*/
RectangleTree(const size_t begin,
const size_t count,
- HRectBound<> bound,
+ HRectBound<EuclideanDistance> bound,
StatisticType stat,
const int maxLeafSize = 20) :
begin(begin),
@@ -541,7 +541,7 @@ class RectangleTree
* shrinking.
* @return true if the bound needed to be changed, false if it did not.
*/
- bool ShrinkBoundForBound(const HRectBound<>& changedBound);
+ bool ShrinkBoundForBound(const HRectBound<EuclideanDistance>& changedBound);
/**
* Make an exact copy of this node, pointers and everything.
diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
index 7981dcf..f903e48 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
@@ -796,7 +796,7 @@ template<typename SplitType,
typename StatisticType,
typename MatType>
bool RectangleTree<SplitType, DescentType, StatisticType, MatType>::
- ShrinkBoundForBound(const HRectBound<>& /* unused */)
+ ShrinkBoundForBound(const HRectBound<EuclideanDistance>& /* unused */)
{
// Using the sum is safe since none of the dimensions can increase.
double sum = 0;
More information about the mlpack-git
mailing list