FastJet 3.4.1
Classes | Public Member Functions | List of all members
fastjet::SearchTree< T > Class Template Reference

More...

#include <fastjet/internal/SearchTree.hh>

Classes

class  circulator
 
class  const_circulator
 
class  Node
 

Public Member Functions

 SearchTree (const std::vector< T > &init)
 constructor for a search tree from an ordered vector More...
 
 SearchTree (const std::vector< T > &init, unsigned int max_size)
 constructor for a search tree from an ordered vector allowing for future growth beyond the current size, up to max_size More...
 
void remove (unsigned node_index)
 remove the node corresponding to node_index from the search tree
 
void remove (typename SearchTree::Node *node)
 
void remove (typename SearchTree::circulator &circ)
 
circulator insert (const T &value)
 insert the supplied value into the tree and return a pointer to the relevant SearchTreeNode. More...
 
const Nodeoperator[] (int i) const
 
unsigned int size () const
 return the number of elements currently in the search tree More...
 
void verify_structure ()
 check that the structure we've obtained makes sense... More...
 
void verify_structure_linear () const
 
void verify_structure_recursive (const Node *, const Node *, const Node *) const
 
void print_elements ()
 print out all elements... More...
 
unsigned int max_depth () const
 
int loc (const Node *node) const
 
Node_find_predecessor (const Node *)
 return predecessor by walking through the tree More...
 
Node_find_successor (const Node *)
 return successor by walking through the tree More...
 
const Nodeoperator[] (unsigned int i) const
 
const_circulator somewhere () const
 return a circulator to some place in the tree (with a circulator you don't care where...) More...
 
circulator somewhere ()
 

Detailed Description

template<class T>
class fastjet::SearchTree< T >

Definition at line 54 of file SearchTree.hh.

Constructor & Destructor Documentation

◆ SearchTree() [1/2]

template<class T >
fastjet::SearchTree< T >::SearchTree ( const std::vector< T > &  init)

constructor for a search tree from an ordered vector

initialise from a sorted initial array

Definition at line 331 of file SearchTree.hh.

◆ SearchTree() [2/2]

template<class T >
fastjet::SearchTree< T >::SearchTree ( const std::vector< T > &  init,
unsigned int  max_size 
)

constructor for a search tree from an ordered vector allowing for future growth beyond the current size, up to max_size

initialise from a sorted initial array allowing for a larger maximum size of the array...

Definition at line 316 of file SearchTree.hh.

Member Function Documentation

◆ remove()

template<class T >
void fastjet::SearchTree< T >::remove ( typename SearchTree< T >::circulator &  circ)

Definition at line 463 of file SearchTree.hh.

◆ insert()

template<class T >
SearchTree< T >::circulator fastjet::SearchTree< T >::insert ( const T &  value)

insert the supplied value into the tree and return a pointer to the relevant SearchTreeNode.

Definition at line 563 of file SearchTree.hh.

◆ operator[]() [1/2]

template<class T >
const Node & fastjet::SearchTree< T >::operator[] ( int  i) const
inline

Definition at line 78 of file SearchTree.hh.

◆ size()

template<class T >
unsigned int fastjet::SearchTree< T >::size ( ) const
inline

return the number of elements currently in the search tree

Definition at line 81 of file SearchTree.hh.

◆ verify_structure()

template<class T >
void fastjet::SearchTree< T >::verify_structure

check that the structure we've obtained makes sense...

Definition at line 620 of file SearchTree.hh.

◆ verify_structure_linear()

template<class T >
void fastjet::SearchTree< T >::verify_structure_linear

Definition at line 665 of file SearchTree.hh.

◆ verify_structure_recursive()

template<class T >
void fastjet::SearchTree< T >::verify_structure_recursive ( const Node ,
const Node ,
const Node  
) const

Definition at line 639 of file SearchTree.hh.

◆ print_elements()

template<class T >
void fastjet::SearchTree< T >::print_elements

print out all elements...

Definition at line 754 of file SearchTree.hh.

◆ max_depth()

template<class T >
unsigned int fastjet::SearchTree< T >::max_depth ( ) const
inline

Definition at line 97 of file SearchTree.hh.

◆ loc()

template<class T >
int fastjet::SearchTree< T >::loc ( const Node node) const
inline

Definition at line 385 of file SearchTree.hh.

◆ _find_predecessor()

template<class T >
SearchTree< T >::Node * fastjet::SearchTree< T >::_find_predecessor ( const Node )

return predecessor by walking through the tree

Definition at line 705 of file SearchTree.hh.

◆ _find_successor()

template<class T >
SearchTree< T >::Node * fastjet::SearchTree< T >::_find_successor ( const Node )

return successor by walking through the tree

Definition at line 729 of file SearchTree.hh.

◆ operator[]() [2/2]

template<class T >
const Node & fastjet::SearchTree< T >::operator[] ( unsigned int  i) const
inline

Definition at line 107 of file SearchTree.hh.

◆ somewhere() [1/2]

template<class T >
SearchTree< T >::const_circulator fastjet::SearchTree< T >::somewhere

return a circulator to some place in the tree (with a circulator you don't care where...)

Definition at line 771 of file SearchTree.hh.

◆ somewhere() [2/2]

template<class T >
SearchTree< T >::circulator fastjet::SearchTree< T >::somewhere

Definition at line 765 of file SearchTree.hh.


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