mlpack  master
Public Types | Public Member Functions | Private Attributes | List of all members
mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType > Class Template Reference

Public Types

typedef bound::HRectBound< metric::EuclideanDistance, ElemTypeBoundType
 The bound type held by the auxiliary information. More...
 
typedef TreeType::ElemType ElemType
 The element type held by the tree. More...
 

Public Member Functions

 RPlusPlusTreeAuxiliaryInformation ()
 Construct the auxiliary information object. More...
 
 RPlusPlusTreeAuxiliaryInformation (const TreeType *)
 Construct this as an auxiliary information for the given node. More...
 
 RPlusPlusTreeAuxiliaryInformation (const RPlusPlusTreeAuxiliaryInformation &other, TreeType *tree, bool=true)
 Create an auxiliary information object by copying from another object. More...
 
 RPlusPlusTreeAuxiliaryInformation (RPlusPlusTreeAuxiliaryInformation &&other)
 Create an auxiliary information object by moving from another node. More...
 
bool HandleNodeInsertion (TreeType *, TreeType *, bool)
 Some tree types require to save some properties at the insertion process. More...
 
bool HandleNodeRemoval (TreeType *, const size_t)
 Some tree types require to save some properties at the deletion process. More...
 
bool HandlePointDeletion (TreeType *, const size_t)
 Some tree types require to save some properties at the deletion process. More...
 
bool HandlePointInsertion (TreeType *, const size_t)
 Some tree types require to save some properties at the insertion process. More...
 
void NullifyData ()
 Nullify the auxiliary information in order to prevent an invalid free. More...
 
BoundTypeOuterBound ()
 Return the maximum bounding rectangle. More...
 
const BoundTypeOuterBound () const
 Modify the maximum bounding rectangle. More...
 
template<typename Archive >
void Serialize (Archive &, const unsigned int)
 Serialize the information. More...
 
void SplitAuxiliaryInfo (TreeType *treeOne, TreeType *treeTwo, const size_t axis, const ElemType cut)
 The R++ tree requires to split the maximum bounding rectangle of a node that is being split. More...
 
bool UpdateAuxiliaryInfo (TreeType *)
 Some tree types require to propagate the information upward. More...
 

Private Attributes

BoundType outerBound
 The maximum bounding rectangle. More...
 

Detailed Description

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

Definition at line 24 of file r_plus_plus_tree_auxiliary_information.hpp.

Member Typedef Documentation

The bound type held by the auxiliary information.

Definition at line 30 of file r_plus_plus_tree_auxiliary_information.hpp.

template<typename TreeType >
typedef TreeType::ElemType mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::ElemType

The element type held by the tree.

Definition at line 28 of file r_plus_plus_tree_auxiliary_information.hpp.

Constructor & Destructor Documentation

Construct the auxiliary information object.

template<typename TreeType >
mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::RPlusPlusTreeAuxiliaryInformation ( const TreeType *  )

Construct this as an auxiliary information for the given node.

Parameters
nodeThe node that stores this auxiliary information.
template<typename TreeType >
mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::RPlusPlusTreeAuxiliaryInformation ( const RPlusPlusTreeAuxiliaryInformation< TreeType > &  other,
TreeType *  tree,
bool  = true 
)

Create an auxiliary information object by copying from another object.

Parameters
otherAnother auxiliary information object from which the information will be copied.
treeThe node that holds the auxiliary information.
deepCopyIf false, the new object uses the same memory (not used here).

Create an auxiliary information object by moving from another node.

Parameters
otherThe auxiliary information object from which the information will be moved.

Member Function Documentation

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

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
nodeThe node in which the nodeToInsert is being inserted.
nodeToInsertThe node being inserted.
insertionLevelThe level of the tree at which the nodeToInsert should be inserted.
template<typename TreeType >
bool mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::HandleNodeRemoval ( TreeType *  ,
const size_t   
)

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
nodeThe node from which the node is being deleted.
nodeIndexThe local index of the node being deleted.
template<typename TreeType >
bool mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::HandlePointDeletion ( TreeType *  ,
const size_t   
)

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
nodeThe node from which the point is being deleted.
localIndexThe local index of the point being deleted.
template<typename TreeType >
bool mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::HandlePointInsertion ( TreeType *  ,
const size_t   
)

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
nodeThe node in which the point is being inserted.
pointThe global number of the point being inserted.
template<typename TreeType >
void mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::NullifyData ( )

Nullify the auxiliary information in order to prevent an invalid free.

template<typename TreeType >
BoundType& mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::OuterBound ( )
inline

Return the maximum bounding rectangle.

Definition at line 146 of file r_plus_plus_tree_auxiliary_information.hpp.

References mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::outerBound.

template<typename TreeType >
const BoundType& mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::OuterBound ( ) const
inline

Modify the maximum bounding rectangle.

Definition at line 149 of file r_plus_plus_tree_auxiliary_information.hpp.

References mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::outerBound.

template<typename TreeType >
template<typename Archive >
void mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::Serialize ( Archive &  ,
const unsigned  int 
)

Serialize the information.

template<typename TreeType >
void mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::SplitAuxiliaryInfo ( TreeType *  treeOne,
TreeType *  treeTwo,
const size_t  axis,
const ElemType  cut 
)

The R++ tree requires to split the maximum bounding rectangle of a node that is being split.

This method is intended for that.

Parameters
treeOneThe first subtree.
treeTwoThe second subtree.
axisThe axis along which the split is performed.
cutThe coordinate at which the node is split.
template<typename TreeType >
bool mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::UpdateAuxiliaryInfo ( TreeType *  )

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
nodeThe node in which the auxiliary information being update.

Member Data Documentation

template<typename TreeType >
BoundType mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::outerBound
private

The maximum bounding rectangle.

Definition at line 152 of file r_plus_plus_tree_auxiliary_information.hpp.

Referenced by mlpack::tree::RPlusPlusTreeAuxiliaryInformation< TreeType >::OuterBound().


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