mlpack
Classes | Public Types | Public Member Functions | List of all members
mlpack::tree::XTreeAuxiliaryInformation< TreeType > Class Template Reference

The XTreeAuxiliaryInformation class provides information specific to X trees for each node in a RectangleTree. More...

#include <x_tree_auxiliary_information.hpp>

Classes

struct  SplitHistoryStruct
 The X tree requires that the tree records it's "split history". More...
 

Public Types

typedef struct mlpack::tree::XTreeAuxiliaryInformation::SplitHistoryStruct SplitHistoryStruct
 The X tree requires that the tree records it's "split history". More...
 

Public Member Functions

 XTreeAuxiliaryInformation ()
 Default constructor.
 
 XTreeAuxiliaryInformation (const TreeType *node)
 Construct this with the specified node. More...
 
 XTreeAuxiliaryInformation (const XTreeAuxiliaryInformation &other, TreeType *=NULL, bool=true)
 Create an auxiliary information object by copying from another object. More...
 
XTreeAuxiliaryInformationoperator= (const XTreeAuxiliaryInformation &other)
 Copy the auxiliary information object. More...
 
 XTreeAuxiliaryInformation (XTreeAuxiliaryInformation &&other)
 Create an auxiliary information object by moving from the other node. More...
 
bool HandlePointInsertion (TreeType *, const size_t)
 Some tree types require to save some properties at the insertion process. More...
 
bool HandleNodeInsertion (TreeType *, TreeType *, bool)
 Some tree types require to save some properties at the insertion process. More...
 
bool HandlePointDeletion (TreeType *, const size_t)
 Some tree types require to save some properties at the deletion process. More...
 
bool HandleNodeRemoval (TreeType *, const size_t)
 Some tree types require to save some properties at the deletion process. More...
 
bool UpdateAuxiliaryInfo (TreeType *)
 Some tree types require to propagate the information upward. More...
 
void NullifyData ()
 Nullify the auxiliary information in order to prevent an invalid free.
 
size_t NormalNodeMaxNumChildren () const
 Return the maximum number of a normal node's children.
 
size_t & NormalNodeMaxNumChildren ()
 Modify the maximum number of a normal node's children.
 
const SplitHistoryStructSplitHistory () const
 Return the split history of the node associated with this object.
 
SplitHistoryStructSplitHistory ()
 Modify the split history of the node associated with this object.
 
template<typename Archive >
void serialize (Archive &ar, const uint32_t)
 Serialize the information.
 

Detailed Description

template<typename TreeType>
class mlpack::tree::XTreeAuxiliaryInformation< TreeType >

The XTreeAuxiliaryInformation class provides information specific to X trees for each node in a RectangleTree.

Member Typedef Documentation

◆ SplitHistoryStruct

The X tree requires that the tree records it's "split history".

To make this easy, we use the following structure.

Constructor & Destructor Documentation

◆ XTreeAuxiliaryInformation() [1/3]

template<typename TreeType >
mlpack::tree::XTreeAuxiliaryInformation< TreeType >::XTreeAuxiliaryInformation ( const TreeType *  node)
inline

Construct this with the specified node.

Parameters
nodeThe node that stores this auxiliary information.

◆ XTreeAuxiliaryInformation() [2/3]

template<typename TreeType >
mlpack::tree::XTreeAuxiliaryInformation< TreeType >::XTreeAuxiliaryInformation ( const XTreeAuxiliaryInformation< TreeType > &  other,
TreeType *  = NULL,
bool  = true 
)
inline

Create an auxiliary information object by copying from another object.

Parameters
otherAnother auxiliary information object from which the information will be copied.
*(tree) The node that holds the auxiliary information.
*(deepCopy) If false, the new object uses the same memory (not used here).

◆ XTreeAuxiliaryInformation() [3/3]

template<typename TreeType >
mlpack::tree::XTreeAuxiliaryInformation< TreeType >::XTreeAuxiliaryInformation ( XTreeAuxiliaryInformation< TreeType > &&  other)
inline

Create an auxiliary information object by moving from the other node.

Parameters
otherThe object from which the information will be moved.

Member Function Documentation

◆ HandleNodeInsertion()

template<typename TreeType >
bool mlpack::tree::XTreeAuxiliaryInformation< TreeType >::HandleNodeInsertion ( TreeType *  ,
TreeType *  ,
bool   
)
inline

Some tree types require to save some properties at the insertion process.

This method allows the auxiliary information the option of manipulating the tree in order to perform the insertion process. If the auxiliary information does that, then the method should return true; if the method returns false the RectangleTree performs its default behavior.

Parameters
*(node) The node in which the nodeToInsert is being inserted.
*(nodeToInsert) The node being inserted.
*(insertionLevel) The level of the tree at which the nodeToInsert should be inserted.

◆ HandleNodeRemoval()

template<typename TreeType >
bool mlpack::tree::XTreeAuxiliaryInformation< TreeType >::HandleNodeRemoval ( TreeType *  ,
const size_t   
)
inline

Some tree types require to save some properties at the deletion process.

This method allows the auxiliary information the option of manipulating the tree in order to perform the deletion process. If the auxiliary information does that, then the method should return true; if the method returns false the RectangleTree performs its default behavior.

Parameters
*(node) The node from which the node is being deleted.
*(nodeIndex) The local index of the node being deleted.

◆ HandlePointDeletion()

template<typename TreeType >
bool mlpack::tree::XTreeAuxiliaryInformation< TreeType >::HandlePointDeletion ( TreeType *  ,
const size_t   
)
inline

Some tree types require to save some properties at the deletion process.

This method allows the auxiliary information the option of manipulating the tree in order to perform the deletion process. If the auxiliary information does that, then the method should return true; if the method returns false the RectangleTree performs its default behavior.

Parameters
*(node) The node from which the point is being deleted.
*(localIndex) The local index of the point being deleted.

◆ HandlePointInsertion()

template<typename TreeType >
bool mlpack::tree::XTreeAuxiliaryInformation< TreeType >::HandlePointInsertion ( TreeType *  ,
const size_t   
)
inline

Some tree types require to save some properties at the insertion process.

This method allows the auxiliary information the option of manipulating the tree in order to perform the insertion process. If the auxiliary information does that, then the method should return true; if the method returns false the RectangleTree performs its default behavior.

Parameters
*(node) The node in which the point is being inserted.
*(point) The global number of the point being inserted.

◆ operator=()

template<typename TreeType >
XTreeAuxiliaryInformation& mlpack::tree::XTreeAuxiliaryInformation< TreeType >::operator= ( const XTreeAuxiliaryInformation< TreeType > &  other)
inline

Copy the auxiliary information object.

Parameters
otherThe node from which the information will be copied.

◆ UpdateAuxiliaryInfo()

template<typename TreeType >
bool mlpack::tree::XTreeAuxiliaryInformation< TreeType >::UpdateAuxiliaryInfo ( TreeType *  )
inline

Some tree types require to propagate the information upward.

This method should return false if this is not the case. If true is returned, the update will be propagated upward.

Parameters
*(node) The node in which the auxiliary information being update.

The documentation for this class was generated from the following file: