[mlpack-git] master, mlpack-1.0.x: Having an implementation for the example tree is kind of a dumb idea. Also make sure CMake knows about example_tree.hpp so it keeps it up to date. (9084dd6)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:44:22 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 9084dd6b04496e4f559b766ff6dc0274e2197d67
Author: Ryan Curtin <ryan at ratml.org>
Date:   Thu Feb 20 00:29:38 2014 +0000

    Having an implementation for the example tree is kind of a dumb idea.  Also make
    sure CMake knows about example_tree.hpp so it keeps it up to date.


>---------------------------------------------------------------

9084dd6b04496e4f559b766ff6dc0274e2197d67
 src/mlpack/core/tree/CMakeLists.txt        |   1 +
 src/mlpack/core/tree/example_tree_impl.hpp | 164 -----------------------------
 2 files changed, 1 insertion(+), 164 deletions(-)

diff --git a/src/mlpack/core/tree/CMakeLists.txt b/src/mlpack/core/tree/CMakeLists.txt
index a587f82..b090514 100644
--- a/src/mlpack/core/tree/CMakeLists.txt
+++ b/src/mlpack/core/tree/CMakeLists.txt
@@ -23,6 +23,7 @@ set(SOURCES
   cover_tree/dual_tree_traverser.hpp
   cover_tree/dual_tree_traverser_impl.hpp
   cover_tree/traits.hpp
+  example_tree.hpp
   hrectbound.hpp
   hrectbound_impl.hpp
   mrkd_statistic.hpp
diff --git a/src/mlpack/core/tree/example_tree_impl.hpp b/src/mlpack/core/tree/example_tree_impl.hpp
deleted file mode 100644
index 856f3a3..0000000
--- a/src/mlpack/core/tree/example_tree_impl.hpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- * @file example_tree_impl.hpp
- * @author Ryan Curtin
- *
- * A fake implementation of the functions defined in ExampleTree.  Do not refer
- * to these as guidelines and do not use ExampleTree in your work because it
- * *will* *not* *work*.  The reason these implementations are here is so that we
- * can make tests that ensure mlpack dual-tree algorithms can compile with
- * *only* the functions specified in ExampleTree.
- */
-#ifndef __MLPACK_CORE_TREE_EXAMPLE_TREE_IMPL_HPP
-#define __MLPACK_CORE_TREE_EXAMPLE_TREE_IMPL_HPP
-
-namespace mlpack {
-namespace tree {
-
-template<typename MetricType, typename StatisticType, typename MatType>
-ExampleTree<MetricType, StatisticType, MatType>::ExampleTree(
-    const MatType& dataset, MetricType& metric) : metric(metric), stat(*this)
-{ }
-
-template<typename MetricType, typename StatisticType, typename MatType>
-size_t ExampleTree<MetricType, StatisticType, MatType>::NumChildren() const
-{
-  return 0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-const ExampleTree<MetricType, StatisticType, MatType>&
-ExampleTree<MetricType, StatisticType, MatType>::Child(const size_t i) const
-{
-  return *this;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-ExampleTree<MetricType, StatisticType, MatType>&
-ExampleTree<MetricType, StatisticType, MatType>::Child(const size_t i)
-{
-  return *this;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-ExampleTree<MetricType, StatisticType, MatType>*
-ExampleTree<MetricType, StatisticType, MatType>::Parent() const
-{
-  return NULL;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-size_t ExampleTree<MetricType, StatisticType, MatType>::NumPoints() const
-{
-  return 0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-size_t ExampleTree<MetricType, StatisticType, MatType>::Point(const size_t i)
-    const
-{
-  return 0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-size_t ExampleTree<MetricType, StatisticType, MatType>::NumDescendants() const
-{
-  return 0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-size_t ExampleTree<MetricType, StatisticType, MatType>::Descendant(
-    const size_t i) const
-{
-  return 0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-const StatisticType& ExampleTree<MetricType, StatisticType, MatType>::Stat()
-    const
-{
-  return stat;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-StatisticType& ExampleTree<MetricType, StatisticType, MatType>::Stat()
-{
-  return stat;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-const MetricType& ExampleTree<MetricType, StatisticType, MatType>::Metric()
-    const
-{
-  return metric;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-MetricType& ExampleTree<MetricType, StatisticType, MatType>::Metric()
-{
-  return metric;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-double ExampleTree<MetricType, StatisticType, MatType>::MinDistance(
-    const MatType& point) const
-{
-  return 0.0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-double ExampleTree<MetricType, StatisticType, MatType>::MinDistance(
-    const ExampleTree& node) const
-{
-  return 0.0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-double ExampleTree<MetricType, StatisticType, MatType>::MaxDistance(
-    const MatType& point) const
-{
-  return 0.0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-double ExampleTree<MetricType, StatisticType, MatType>::MaxDistance(
-    const ExampleTree& node) const
-{
-  return 0.0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-math::Range ExampleTree<MetricType, StatisticType, MatType>::RangeDistance(
-    const MatType& point) const
-{
-  return math::Range(0.0, 0.0);
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-math::Range ExampleTree<MetricType, StatisticType, MatType>::RangeDistance(
-    const ExampleTree& node) const
-{
-  return math::Range(0.0, 0.0);
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-void ExampleTree<MetricType, StatisticType, MatType>::Centroid(
-    arma::vec& centroid) const
-{ }
-
-template<typename MetricType, typename StatisticType, typename MatType>
-double ExampleTree<MetricType, StatisticType, MatType>::
-    FurthestDescendantDistance() const
-{
-  return 0.0;
-}
-
-template<typename MetricType, typename StatisticType, typename MatType>
-double ExampleTree<MetricType, StatisticType, MatType>::ParentDistance() const
-{
-  return 0.0;
-}
-
-}; // namespace tree
-}; // namespace mlpack
-
-#endif



More information about the mlpack-git mailing list