Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SearchTree< T > Class Template Reference
+ Collaboration diagram for SearchTree< T >:

Classes

class  circulator
 
class  const_circulator
 
class  Node
 

Public Member Functions

 SearchTree (const std::vector< T > &init)
 
 SearchTree (const std::vector< T > &init, unsigned int max_size)
 
void remove (unsigned node_index)
 
void remove (typename SearchTree::Node *node)
 
void remove (typename SearchTree::circulator &circ)
 
circulator insert (const T &value)
 
const Nodeoperator[] (int i) const
 
unsigned int size () const
 
void verify_structure ()
 
void verify_structure_linear () const
 
void verify_structure_recursive (const Node *, const Node *, const Node *) const
 
void print_elements ()
 
unsigned int max_depth () const
 
int loc (const Node *node) const
 
Node_find_predecessor (const Node *)
 
Node_find_successor (const Node *)
 
const Nodeoperator[] (unsigned int i) const
 
const_circulator somewhere () const
 
circulator somewhere ()
 

Private Member Functions

void _initialize (const std::vector< T > &init)
 
void _do_initial_connections (unsigned int this_one, unsigned int scale, unsigned int left_edge, unsigned int right_edge, unsigned int depth)
 

Private Attributes

std::vector< Node_nodes
 
std::vector< Node * > _available_nodes
 
Node_top_node
 
unsigned int _n_removes
 

Detailed Description

template<class T>
class SearchTree< T >

Definition at line 225 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 225 of file fjcore.cc

Constructor & Destructor Documentation

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

Definition at line 362 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 362 of file fjcore.cc

References SearchTree< T >::_available_nodes, and SearchTree< T >::_initialize().

+ Here is the call graph for this function:

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

Definition at line 352 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 352 of file fjcore.cc

References SearchTree< T >::_available_nodes, SearchTree< T >::_initialize(), SearchTree< T >::_nodes, and i.

+ Here is the call graph for this function:

Member Function Documentation

template<class T >
void SearchTree< T >::_do_initial_connections ( unsigned int  this_one,
unsigned int  scale,
unsigned int  left_edge,
unsigned int  right_edge,
unsigned int  depth 
)
private

Definition at line 393 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 393 of file fjcore.cc

References left().

+ Here is the call graph for this function:

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

Definition at line 585 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 585 of file fjcore.cc

References SearchTree< T >::Node::left, SearchTree< T >::Node::parent, and SearchTree< T >::Node::right.

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

Definition at line 602 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 602 of file fjcore.cc

References SearchTree< T >::Node::left, SearchTree< T >::Node::parent, and SearchTree< T >::Node::right.

template<class T >
void SearchTree< T >::_initialize ( const std::vector< T > &  init)
private

Definition at line 367 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 367 of file fjcore.cc

References assert, i, Acts::UnitConstants::min, and n.

Referenced by SearchTree< T >::SearchTree().

+ Here is the caller graph for this function:

template<class T >
SearchTree< T >::circulator SearchTree< T >::insert ( const T value)
template<class T >
int SearchTree< T >::loc ( const Node node) const
inline

Definition at line 391 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 391 of file fjcore.cc

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

Definition at line 245 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 245 of file fjcore.cc

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

Definition at line 236 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 236 of file fjcore.cc

References SearchTree< T >::_nodes, and i.

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

Definition at line 250 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 250 of file fjcore.cc

References SearchTree< T >::_nodes, and i.

template<class T >
void SearchTree< T >::print_elements ( )

Definition at line 619 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 619 of file fjcore.cc

References SearchTree< T >::Node::left, loc, n, SearchTree< T >::Node::parent, SearchTree< T >::Node::predecessor, printf(), SearchTree< T >::Node::right, SearchTree< T >::Node::successor, and SearchTree< T >::Node::value.

+ Here is the call graph for this function:

template<class T >
void SearchTree< T >::remove ( unsigned  node_index)
template<class T >
void SearchTree< T >::remove ( typename SearchTree< T >::Node node)
template<class T >
void SearchTree< T >::remove ( typename SearchTree< T >::circulator circ)

Definition at line 441 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 441 of file fjcore.cc

References SearchTree< T >::circulator::_node.

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

Definition at line 237 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 237 of file fjcore.cc

References SearchTree< T >::_available_nodes, and SearchTree< T >::_nodes.

template<class T >
SearchTree< T >::const_circulator SearchTree< T >::somewhere ( ) const

Definition at line 630 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 630 of file fjcore.cc

template<class T >
SearchTree< T >::circulator SearchTree< T >::somewhere ( )

Definition at line 627 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 627 of file fjcore.cc

template<class T >
void SearchTree< T >::verify_structure ( )

Definition at line 538 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 538 of file fjcore.cc

References SearchTree< T >::Node::left, and SearchTree< T >::Node::right.

template<class T >
void SearchTree< T >::verify_structure_linear ( ) const

Definition at line 565 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 565 of file fjcore.cc

References assert, i, SearchTree< T >::Node::left, SearchTree< T >::Node::parent, SearchTree< T >::Node::right, size, SearchTree< T >::Node::treelinks_null(), and SearchTree< T >::Node::value.

+ Here is the call graph for this function:

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

Definition at line 546 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 546 of file fjcore.cc

References assert, SearchTree< T >::Node::left, left(), SearchTree< T >::Node::right, and SearchTree< T >::Node::value.

+ Here is the call graph for this function:

Member Data Documentation

template<class T >
std::vector<Node *> SearchTree< T >::_available_nodes
private

Definition at line 256 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 256 of file fjcore.cc

Referenced by SearchTree< T >::SearchTree(), and SearchTree< T >::size().

template<class T >
unsigned int SearchTree< T >::_n_removes
private

Definition at line 258 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 258 of file fjcore.cc

template<class T >
std::vector<Node> SearchTree< T >::_nodes
private

Definition at line 255 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 255 of file fjcore.cc

Referenced by SearchTree< T >::operator[](), SearchTree< T >::SearchTree(), and SearchTree< T >::size().

template<class T >
Node* SearchTree< T >::_top_node
private

Definition at line 257 of file fjcore.cc.

View newest version in sPHENIX GitHub at line 257 of file fjcore.cc


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