From 37c51739406eec0bc44e830d7e38f99178a26b00 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Thu, 14 May 2015 16:00:16 -0400 Subject: [PATCH] Fix includes. --- src/mlpack/core/tree/binary_space_tree.hpp | 5 ++-- .../binary_space_tree/binary_space_tree.hpp | 2 +- src/mlpack/core/tree/cover_tree.hpp | 3 ++- .../core/tree/cover_tree/cover_tree.hpp | 4 ++-- .../core/tree/cover_tree/cover_tree_impl.hpp | 24 +++++++++---------- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/mlpack/core/tree/binary_space_tree.hpp b/src/mlpack/core/tree/binary_space_tree.hpp index 374c3358c6..17dea2879b 100644 --- a/src/mlpack/core/tree/binary_space_tree.hpp +++ b/src/mlpack/core/tree/binary_space_tree.hpp @@ -7,7 +7,10 @@ #ifndef __MLPACK_CORE_TREE_BINARY_SPACE_TREE_HPP #define __MLPACK_CORE_TREE_BINARY_SPACE_TREE_HPP +#include #include "bounds.hpp" +#include "binary_space_tree/midpoint_split.hpp" +#include "binary_space_tree/mean_split.hpp" #include "binary_space_tree/binary_space_tree.hpp" #include "binary_space_tree/single_tree_traverser.hpp" #include "binary_space_tree/single_tree_traverser_impl.hpp" @@ -16,7 +19,5 @@ #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/midpoint_split.hpp" -#include "binary_space_tree/mean_split.hpp" #endif diff --git a/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp b/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp index caab084cbe..7e776906c9 100644 --- a/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp +++ b/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp @@ -7,9 +7,9 @@ #define __MLPACK_CORE_TREE_BINARY_SPACE_TREE_BINARY_SPACE_TREE_HPP #include -#include "midpoint_split.hpp" #include "../statistic.hpp" +#include "../binary_space_tree.hpp" namespace mlpack { namespace tree /** Trees and tree-building procedures. */ { diff --git a/src/mlpack/core/tree/cover_tree.hpp b/src/mlpack/core/tree/cover_tree.hpp index 553c31d4b9..b82befc308 100644 --- a/src/mlpack/core/tree/cover_tree.hpp +++ b/src/mlpack/core/tree/cover_tree.hpp @@ -7,7 +7,8 @@ #ifndef __MLPACK_CORE_TREE_COVER_TREE_HPP #define __MLPACK_CORE_TREE_COVER_TREE_HPP -#include "bounds.hpp" +#include +#include "cover_tree/first_point_is_root.hpp" #include "cover_tree/cover_tree.hpp" #include "cover_tree/single_tree_traverser.hpp" #include "cover_tree/single_tree_traverser_impl.hpp" diff --git a/src/mlpack/core/tree/cover_tree/cover_tree.hpp b/src/mlpack/core/tree/cover_tree/cover_tree.hpp index 07e3fb0830..064a500407 100644 --- a/src/mlpack/core/tree/cover_tree/cover_tree.hpp +++ b/src/mlpack/core/tree/cover_tree/cover_tree.hpp @@ -8,9 +8,9 @@ #define __MLPACK_CORE_TREE_COVER_TREE_COVER_TREE_HPP #include -#include -#include "first_point_is_root.hpp" + #include "../statistic.hpp" +#include "../cover_tree.hpp" namespace mlpack { namespace tree { diff --git a/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp b/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp index 24ed095f5b..d42a8ba72d 100644 --- a/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp +++ b/src/mlpack/core/tree/cover_tree/cover_tree_impl.hpp @@ -1121,24 +1121,24 @@ std::string CoverTree:: { std::ostringstream convert; convert << "CoverTree [" << this << "]" << std::endl; - convert << "dataset: " << &dataset << std::endl; - convert << "point: " << point << std::endl; - convert << "scale: " << scale << std::endl; - convert << "base: " << base << std::endl; -// convert << "StatisticType: " << stat << std::endl; - convert << "parent distance : " << parentDistance << std::endl; - convert << "furthest child distance: " << furthestDescendantDistance; + convert << " dataset: " << &dataset << std::endl; + convert << " point: " << point << std::endl; + convert << " scale: " << scale << std::endl; + convert << " base: " << base << std::endl; + convert << " parent distance : " << parentDistance << std::endl; + convert << " furthest child distance: " << furthestDescendantDistance; convert << std::endl; - convert << "children:"; + convert << " children:"; // How many levels should we print? This will print the top two tree levels. if (IsLeaf() == false && parent == NULL) - { for (size_t i = 0; i < children.size(); i++) - { convert << std::endl << mlpack::util::Indent(children.at(i)->ToString()); - } - } + convert << std::endl; + convert << " descendants: " << NumDescendants() << std::endl; + + convert << "StatisticType: " << stat << std::endl; + return convert.str(); }