traversal_info.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_CORE_TREE_TRAVERSAL_INFO_HPP
15 #define MLPACK_CORE_TREE_TRAVERSAL_INFO_HPP
16 
17 namespace mlpack {
18 namespace tree {
19 
49 template<typename TreeType>
51 {
52  public:
57  lastQueryNode(NULL),
58  lastReferenceNode(NULL),
59  lastScore(0.0),
60  lastBaseCase(0.0) { /* Nothing to do. */ }
61 
63  TreeType* LastQueryNode() const { return lastQueryNode; }
65  TreeType*& LastQueryNode() { return lastQueryNode; }
66 
68  TreeType* LastReferenceNode() const { return lastReferenceNode; }
70  TreeType*& LastReferenceNode() { return lastReferenceNode; }
71 
73  double LastScore() const { return lastScore; }
75  double& LastScore() { return lastScore; }
76 
78  double LastBaseCase() const { return lastBaseCase; }
80  double& LastBaseCase() { return lastBaseCase; }
81 
82  private:
84  TreeType* lastQueryNode;
86  TreeType* lastReferenceNode;
88  double lastScore;
90  double lastBaseCase;
91 };
92 
93 } // namespace tree
94 } // namespace mlpack
95 
96 #endif
The TraversalInfo class holds traversal information which is used in dual-tree (and single-tree) trav...
.hpp
Definition: add_to_po.hpp:21
double & LastBaseCase()
Modify the base case associated with the last node combination.
TreeType * LastReferenceNode() const
Get the last reference node.
TreeType *& LastQueryNode()
Modify the last query node.
TreeType *& LastReferenceNode()
Modify the last reference node.
double LastBaseCase() const
Get the base case associated with the last node combination.
TreeType * LastQueryNode() const
Get the last query node.
TraversalInfo()
Create the TraversalInfo object and initialize the pointers to NULL.
double & LastScore()
Modify the score associated with the last query and reference nodes.
double LastScore() const
Get the score associated with the last query and reference nodes.