mlpack 3.4.2
hilbert_r_tree_auxiliary_information.hpp
Go to the documentation of this file.
1
14#ifndef MLPACK_CORE_TREE_RECTANGLE_TREE_HR_TREE_AUXILIARY_INFO_HPP
15#define MLPACK_CORE_TREE_RECTANGLE_TREE_HR_TREE_AUXILIARY_INFO_HPP
16
17namespace mlpack {
18namespace tree {
19
20template<typename TreeType,
21 template<typename> class HilbertValueType>
23{
24 public:
26 typedef typename TreeType::ElemType ElemType;
29
35 HilbertRTreeAuxiliaryInformation(const TreeType* node);
36
48 TreeType* tree = NULL,
49 bool deepCopy = true);
50
57
65
74 bool HandlePointInsertion(TreeType* node, const size_t point);
75
86 bool HandleNodeInsertion(TreeType* node,
87 TreeType* nodeToInsert,
88 bool insertionLevel);
89
99 bool HandlePointDeletion(TreeType* node, const size_t localIndex);
100
110 bool HandleNodeRemoval(TreeType* node, const size_t nodeIndex);
111
118 bool UpdateAuxiliaryInfo(TreeType* node);
119
122
124 static const std::vector<TreeType*> Children(const TreeType* tree)
125 { return tree->children; }
126
127 private:
129 HilbertValueType<ElemType> hilbertValue;
130
131 public:
133 const HilbertValueType<ElemType>& HilbertValue() const
134 { return hilbertValue; }
136 HilbertValueType<ElemType>& HilbertValue() { return hilbertValue; }
137
141 template<typename Archive>
142 void serialize(Archive& ar, const unsigned int /* version */);
143};
144
145} // namespace tree
146} // namespace mlpack
147
148#include "hilbert_r_tree_auxiliary_information_impl.hpp"
149
150#endif // MLPACK_CORE_TREE_RECTANGLE_TREE_HR_TREE_AUXILIARY_INFO_HPP
HilbertRTreeAuxiliaryInformation(const TreeType *node)
Construct this as an auxiliary information for the given node.
static const std::vector< TreeType * > Children(const TreeType *tree)
Return the children vector of the tree.
bool UpdateAuxiliaryInfo(TreeType *node)
Update the auxiliary information in the node.
bool HandleNodeRemoval(TreeType *node, const size_t nodeIndex)
The Hilbert R tree requires all nodes to be arranged according to their Hilbert value.
bool HandlePointDeletion(TreeType *node, const size_t localIndex)
The Hilbert R tree requires all points to be arranged according to their Hilbert value.
HilbertValueType< ElemType > & HilbertValue()
Modify the largest Hilbert value of a point covered by the node.
HilbertRTreeAuxiliaryInformation(HilbertRTreeAuxiliaryInformation &&other)
Create an auxiliary information object by moving from the other node.
HilbertRTreeAuxiliaryInformation()
Default constructor.
TreeType::ElemType ElemType
The element type held by the tree.
bool HandleNodeInsertion(TreeType *node, TreeType *nodeToInsert, bool insertionLevel)
The Hilbert R tree requires to insert nodes according to their Hilbert value.
const HilbertValueType< ElemType > & HilbertValue() const
Return the largest Hilbert value of a point covered by the node.
bool HandlePointInsertion(TreeType *node, const size_t point)
The Hilbert R tree requires to insert points according to their Hilbert value.
HilbertRTreeAuxiliaryInformation(const HilbertRTreeAuxiliaryInformation &other, TreeType *tree=NULL, bool deepCopy=true)
Create an auxiliary information object by copying from another object.
HilbertRTreeAuxiliaryInformation & operator=(const HilbertRTreeAuxiliaryInformation &other)
Copy the auxiliary information.
void serialize(Archive &ar, const unsigned int)
Serialize the information.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1