[mlpack-git] master: Switch to struct to be in line with other trait structs. (3b44f3d)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Aug 31 15:46:08 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/fab25eaf7b9630076fd3b980e43a25363a936d28...b34381d94ec4d8f026a2954f8376b9df5a4d661d
>---------------------------------------------------------------
commit 3b44f3dae40632a624275c7f2567ee85f8a2889f
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Aug 31 15:32:29 2015 +0000
Switch to struct to be in line with other trait structs.
>---------------------------------------------------------------
3b44f3dae40632a624275c7f2567ee85f8a2889f
src/mlpack/core/tree/binary_space_tree/traits.hpp | 5 ++---
src/mlpack/core/tree/cover_tree/traits.hpp | 4 ++--
src/mlpack/core/tree/rectangle_tree/traits.hpp | 5 ++---
src/mlpack/core/tree/tree_traits.hpp | 7 +++----
4 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/mlpack/core/tree/binary_space_tree/traits.hpp b/src/mlpack/core/tree/binary_space_tree/traits.hpp
index 44e42b4..08285f1 100644
--- a/src/mlpack/core/tree/binary_space_tree/traits.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/traits.hpp
@@ -24,10 +24,9 @@ template<typename MetricType,
template<typename BoundMetricType> class BoundType,
template<typename SplitBoundType, typename SplitMatType>
class SplitType>
-class TreeTraits<BinarySpaceTree<MetricType, StatisticType, MatType, BoundType,
- SplitType>>
+struct TreeTraits<BinarySpaceTree<MetricType, StatisticType, MatType, BoundType,
+ SplitType>>
{
- public:
/**
* Each binary space tree node has two children which represent
* non-overlapping subsets of the space which the node represents. Therefore,
diff --git a/src/mlpack/core/tree/cover_tree/traits.hpp b/src/mlpack/core/tree/cover_tree/traits.hpp
index 60d6aa1..fd66562 100644
--- a/src/mlpack/core/tree/cover_tree/traits.hpp
+++ b/src/mlpack/core/tree/cover_tree/traits.hpp
@@ -23,9 +23,9 @@ template<typename MetricType,
typename StatisticType,
typename MatType,
typename RootPointPolicy>
-class TreeTraits<CoverTree<MetricType, StatisticType, MatType, RootPointPolicy>>
+struct TreeTraits<CoverTree<MetricType, StatisticType, MatType,
+ RootPointPolicy>>
{
- public:
/**
* The cover tree (or, this implementation of it) does not require that
* children represent non-overlapping subsets of the parent node.
diff --git a/src/mlpack/core/tree/rectangle_tree/traits.hpp b/src/mlpack/core/tree/rectangle_tree/traits.hpp
index 811d9ac..a3f4456 100644
--- a/src/mlpack/core/tree/rectangle_tree/traits.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/traits.hpp
@@ -23,10 +23,9 @@ template<typename MetricType,
typename MatType,
typename SplitType,
typename DescentType>
-class TreeTraits<RectangleTree<MetricType, StatisticType, MatType, SplitType,
- DescentType>>
+struct TreeTraits<RectangleTree<MetricType, StatisticType, MatType, SplitType,
+ DescentType>>
{
- public:
/**
* An R-tree can have overlapping children.
*/
diff --git a/src/mlpack/core/tree/tree_traits.hpp b/src/mlpack/core/tree/tree_traits.hpp
index 44d5134..9a1f244 100644
--- a/src/mlpack/core/tree/tree_traits.hpp
+++ b/src/mlpack/core/tree/tree_traits.hpp
@@ -69,9 +69,8 @@ namespace tree {
* mlpack/core/tree/binary_space_tree/traits.hpp for an example.
*/
template<typename TreeType>
-class TreeTraits
+struct TreeTraits
{
- public:
/**
* This is true if the subspaces represented by the children of a node can
* overlap.
@@ -100,7 +99,7 @@ class TreeTraits
static const bool BinaryTree = false;
};
-}; // namespace tree
-}; // namespace mlpack
+} // namespace tree
+} // namespace mlpack
#endif
More information about the mlpack-git
mailing list