Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4KDNode< PointT > Class Template Reference

#include <G4KDNode.hh>

Inheritance diagram for G4KDNode< PointT >:
Collaboration diagram for G4KDNode< PointT >:

Public Member Functions

 G4KDNode (G4KDTree *, PointT *, G4KDNode_Base *)
 
virtual ~G4KDNode ()
 
voidoperator new (size_t)
 
void operator delete (void *)
 
PointT * GetPoint ()
 
virtual double operator[] (size_t i) const
 
virtual void InactiveNode ()
 
virtual bool IsValid () const
 
template<>
 ~G4KDNode ()
 
template<>
 ~G4KDNode ()
 
template<>
 ~G4KDNode ()
 
template<>
 ~G4KDNode ()
 
- Public Member Functions inherited from G4KDNode_Base
 G4KDNode_Base (G4KDTree *, G4KDNode_Base *)
 
virtual ~G4KDNode_Base ()
 
G4KDTreeGetTree () const
 
void SetTree (G4KDTree *tree)
 
int GetDim () const
 
int GetAxis () const
 
G4KDNode_BaseGetParent ()
 
G4KDNode_BaseGetLeft ()
 
G4KDNode_BaseGetRight ()
 
template<typename Position >
G4KDNode_BaseFindParent (const Position &x0)
 
template<typename PointT >
G4KDNode_BaseInsert (PointT *point)
 
template<typename PointT >
G4KDNode_BaseInsert (const PointT &point)
 
int Insert (G4KDNode_Base *newNode)
 
void PullSubTree ()
 
void RetrieveNodeList (std::list< G4KDNode_Base * > &node_list)
 
void Print (std::ostream &out, int level=0) const
 

Protected Attributes

PointT * fPoint
 
bool fValid
 
- Protected Attributes inherited from G4KDNode_Base
size_t fAxis
 
int fSide
 
G4KDTreefTree
 
G4KDNode_BasefLeft
 
G4KDNode_BasefRight
 
G4KDNode_BasefParent
 

Detailed Description

template<typename PointT>
class G4KDNode< PointT >

G4KDNode stores one entity in G4KDTree This class is for internal use only

Definition at line 136 of file G4KDNode.hh.

Constructor & Destructor Documentation

template<typename PointT>
G4KDNode< PointT >::G4KDNode ( G4KDTree ,
PointT *  ,
G4KDNode_Base  
)
template<typename PointT>
virtual G4KDNode< PointT >::~G4KDNode ( )
virtual
template<>
G4KDNode< G4IT >::~G4KDNode ( )
template<>
G4KDNode< G4IT >::~G4KDNode ( )

Definition at line 60 of file G4IT.cc.

60  {
61  fPoint->SetNode(nullptr);
62 }
PointT * fPoint
Definition: G4KDNode.hh:171
template<>
G4KDNode< G4Molecule >::~G4KDNode ( )
template<>
G4KDNode< G4Molecule >::~G4KDNode ( )

Definition at line 70 of file G4Molecule.cc.

70  {
71  fPoint->SetNode(nullptr);
72 }
PointT * fPoint
Definition: G4KDNode.hh:171

Member Function Documentation

template<typename PointT>
PointT* G4KDNode< PointT >::GetPoint ( )
inline

Definition at line 148 of file G4KDNode.hh.

149  {
150  return fPoint;
151  }
PointT * fPoint
Definition: G4KDNode.hh:171

Here is the caller graph for this function:

template<typename PointT>
virtual void G4KDNode< PointT >::InactiveNode ( )
inlinevirtual

Reimplemented from G4KDNode_Base.

Definition at line 159 of file G4KDNode.hh.

160  {
161  fValid = false;
163  }
virtual void InactiveNode()
Definition: G4KDNode.cc:107
bool fValid
Definition: G4KDNode.hh:172

Here is the call graph for this function:

template<typename PointT>
virtual bool G4KDNode< PointT >::IsValid ( ) const
inlinevirtual

Reimplemented from G4KDNode_Base.

Definition at line 165 of file G4KDNode.hh.

166  {
167  return fValid;
168  }
bool fValid
Definition: G4KDNode.hh:172
template<typename PointT >
void G4KDNode< PointT >::operator delete ( void aNode)

Definition at line 193 of file G4KDNode.hh.

194  {
195  fgAllocator->FreeSingle((G4KDNode<PointT> *) aNode);
196  }
void FreeSingle(Type *anElement)
Definition: G4Allocator.hh:212
template<typename PointT >
void * G4KDNode< PointT >::operator new ( size_t  )

Definition at line 186 of file G4KDNode.hh.

187  {
188  if(!fgAllocator) fgAllocator = new G4Allocator<G4KDNode<PointT> >;
189  return (void *) fgAllocator->MallocSingle();
190  }
Type * MallocSingle()
Definition: G4Allocator.hh:202

Here is the call graph for this function:

template<typename PointT>
virtual double G4KDNode< PointT >::operator[] ( size_t  i) const
inlinevirtual

Implements G4KDNode_Base.

Definition at line 153 of file G4KDNode.hh.

154  {
155  if(fPoint == 0) abort();
156  return (*fPoint)[i];
157  }
PointT * fPoint
Definition: G4KDNode.hh:171

Member Data Documentation

template<typename PointT>
PointT* G4KDNode< PointT >::fPoint
protected

Definition at line 171 of file G4KDNode.hh.

template<typename PointT>
bool G4KDNode< PointT >::fValid
protected

Definition at line 172 of file G4KDNode.hh.


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