mlpack 3.4.2
traits.hpp
Go to the documentation of this file.
1
12#ifndef MLPACK_CORE_TREE_RECTANGLE_TREE_TRAITS_HPP
13#define MLPACK_CORE_TREE_RECTANGLE_TREE_TRAITS_HPP
14
16
17namespace mlpack {
18namespace tree {
19
26template<typename MetricType,
27 typename StatisticType,
28 typename MatType,
29 typename SplitType,
30 typename DescentType,
31 template<typename> class AuxiliaryInformationType>
32class TreeTraits<RectangleTree<MetricType, StatisticType, MatType, SplitType,
33 DescentType, AuxiliaryInformationType>>
34{
35 public:
39 static const bool HasOverlappingChildren = true;
40
44 static const bool HasDuplicatedPoints = false;
45
49 static const bool FirstPointIsCentroid = false;
50
54 static const bool HasSelfChildren = false;
55
61 static const bool RearrangesDataset = false;
62
66 static const bool BinaryTree = false;
67
72 static const bool UniqueNumDescendants = true;
73};
74
79template<typename MetricType,
80 typename StatisticType,
81 typename MatType,
82 typename SplitPolicyType,
83 template<typename> class SweepType,
84 typename DescentType,
85 template<typename> class AuxiliaryInformationType>
86class TreeTraits<RectangleTree<MetricType,
87 StatisticType,
88 MatType,
89 RPlusTreeSplit<SplitPolicyType,
90 SweepType>,
91 DescentType,
92 AuxiliaryInformationType>>
93{
94 public:
98 static const bool HasOverlappingChildren = false;
99
103 static const bool HasDuplicatedPoints = false;
104
108 static const bool FirstPointIsCentroid = false;
109
113 static const bool HasSelfChildren = false;
114
120 static const bool RearrangesDataset = false;
121
125 static const bool BinaryTree = false;
126
131 static const bool UniqueNumDescendants = true;
132};
133
134} // namespace tree
135} // namespace mlpack
136
137#endif
The RPlusTreeSplit class performs the split process of a node on overflow.
A rectangle type tree tree, such as an R-tree or X-tree.
The TreeTraits class provides compile-time information on the characteristics of a given tree type.
Definition: tree_traits.hpp:78
static const bool UniqueNumDescendants
This is true if the NumDescendants() method doesn't include duplicated points.
static const bool FirstPointIsCentroid
This is true if the first point of each node is the centroid of its bound.
Definition: tree_traits.hpp:94
static const bool HasOverlappingChildren
This is true if the subspaces represented by the children of a node can overlap.
Definition: tree_traits.hpp:84
static const bool RearrangesDataset
This is true if the tree rearranges points in the dataset when it is built.
static const bool HasSelfChildren
This is true if the points contained in the first child of a node (Child(0)) are also contained in th...
static const bool BinaryTree
This is true if the tree always has only two children.
static const bool HasDuplicatedPoints
This is true if a point can be included in more than one node.
Definition: tree_traits.hpp:89
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1