Geant4_10
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
G4KDTree Class Reference

#include <G4KDTree.hh>

Collaboration diagram for G4KDTree:
Collaboration graph
[legend]

Public Member Functions

 G4KDTree (int dim=3)
 
virtual ~G4KDTree ()
 
void Clear ()
 
int GetDim ()
 
void SetDataDestructor (void(*fDestr)(void *))
 
int GetNbNodes ()
 
G4KDNodeGetRoot ()
 
G4KDNodeInsertMap (const double &x, const double &y, const double &z, void *data)
 
G4KDNodeInsertMap (const double *pos, void *data)
 
void Build ()
 
G4KDNodeInsert (const double *pos, void *data)
 
G4KDNodeInsert (const double &x, const double &y, const double &z, void *data)
 
G4KDTreeResultHandle Nearest (const double *pos)
 
G4KDTreeResultHandle Nearest (const double &x, const double &y, const double &z)
 
G4KDTreeResultHandle Nearest (G4KDNode *node)
 
G4KDTreeResultHandle NearestInRange (const double *pos, const double &range)
 
G4KDTreeResultHandle NearestInRange (const double &x, const double &y, const double &z, const double &range)
 
G4KDTreeResultHandle NearestInRange (G4KDNode *node, const double &range)
 

Protected Member Functions

void __Clear_Rec (G4KDNode *node)
 
int __NearestInRange (G4KDNode *node, const double *pos, const double &range_sq, const double &range, G4KDTreeResult &list, int ordered, G4KDNode *source_node=0)
 
void __NearestToPosition (G4KDNode *node, const double *pos, G4KDNode *&result, double *result_dist_sq, struct HyperRect *fRect)
 
void __NearestToNode (G4KDNode *source_node, G4KDNode *node, const double *pos, std::vector< G4KDNode * > &result, double *result_dist_sq, struct HyperRect *fRect, int &nbresult)
 

Protected Attributes

G4KDNodefRoot
 

Friends

class G4KDNode
 

Detailed Description

G4KDTree is used by the ITManager to locate the neareast neighbours. A kdtree sorts out node in such a way that it reduces the number of node check. The results of this search can be retrieved by G4KDTreeResultHandle.

Definition at line 62 of file G4KDTree.hh.

Constructor & Destructor Documentation

G4KDTree::G4KDTree ( int  dim = 3)

Definition at line 170 of file G4KDTree.cc.

G4KDTree::~G4KDTree ( )
virtual

Definition at line 179 of file G4KDTree.cc.

Here is the call graph for this function:

Member Function Documentation

void G4KDTree::__Clear_Rec ( G4KDNode node)
protected

Definition at line 206 of file G4KDTree.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int G4KDTree::__NearestInRange ( G4KDNode node,
const double *  pos,
const double &  range_sq,
const double &  range,
G4KDTreeResult list,
int  ordered,
G4KDNode source_node = 0 
)
protected

Definition at line 303 of file G4KDTree.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void G4KDTree::__NearestToNode ( G4KDNode source_node,
G4KDNode node,
const double *  pos,
std::vector< G4KDNode * > &  result,
double *  result_dist_sq,
struct HyperRect fRect,
int nbresult 
)
protected

Definition at line 462 of file G4KDTree.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void G4KDTree::__NearestToPosition ( G4KDNode node,
const double *  pos,
G4KDNode *&  result,
double *  result_dist_sq,
struct HyperRect fRect 
)
protected

Definition at line 350 of file G4KDTree.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void G4KDTree::Build ( )

Definition at line 241 of file G4KDTree.cc.

Here is the call graph for this function:

void G4KDTree::Clear ( )

Definition at line 193 of file G4KDTree.cc.

Here is the call graph for this function:

int G4KDTree::GetDim ( )
inline

Definition at line 143 of file G4KDTree.hh.

Here is the caller graph for this function:

int G4KDTree::GetNbNodes ( )
inline

Definition at line 83 of file G4KDTree.hh.

G4KDNode* G4KDTree::GetRoot ( )
inline

Definition at line 84 of file G4KDTree.hh.

G4KDNode * G4KDTree::Insert ( const double *  pos,
void data 
)

Definition at line 263 of file G4KDTree.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

G4KDNode * G4KDTree::Insert ( const double &  x,
const double &  y,
const double &  z,
void data 
)

Definition at line 293 of file G4KDTree.cc.

Here is the call graph for this function:

G4KDNode * G4KDTree::InsertMap ( const double &  x,
const double &  y,
const double &  z,
void data 
)

Definition at line 224 of file G4KDTree.cc.

G4KDNode * G4KDTree::InsertMap ( const double *  pos,
void data 
)

Definition at line 233 of file G4KDTree.cc.

Here is the call graph for this function:

G4KDTreeResultHandle G4KDTree::Nearest ( const double *  pos)

Definition at line 428 of file G4KDTree.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

G4KDTreeResultHandle G4KDTree::Nearest ( const double &  x,
const double &  y,
const double &  z 
)

Definition at line 594 of file G4KDTree.cc.

Here is the call graph for this function:

G4KDTreeResultHandle G4KDTree::Nearest ( G4KDNode node)

Definition at line 550 of file G4KDTree.cc.

Here is the call graph for this function:

G4KDTreeResultHandle G4KDTree::NearestInRange ( const double *  pos,
const double &  range 
)

Definition at line 603 of file G4KDTree.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

G4KDTreeResultHandle G4KDTree::NearestInRange ( const double &  x,
const double &  y,
const double &  z,
const double &  range 
)

Definition at line 620 of file G4KDTree.cc.

Here is the call graph for this function:

G4KDTreeResultHandle G4KDTree::NearestInRange ( G4KDNode node,
const double &  range 
)

Definition at line 632 of file G4KDTree.cc.

Here is the call graph for this function:

void G4KDTree::SetDataDestructor ( void(*)(void *)  fDestr)
inline

Definition at line 148 of file G4KDTree.hh.

Friends And Related Function Documentation

friend class G4KDNode
friend

Definition at line 64 of file G4KDTree.hh.

Member Data Documentation

G4KDNode* G4KDTree::fRoot
protected

Definition at line 72 of file G4KDTree.hh.


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