Geant4  10.02.p03
G4KDNodeCopy< PointCopyT > Class Template Reference

#include <G4KDNode.hh>

Inheritance diagram for G4KDNodeCopy< PointCopyT >:
Collaboration diagram for G4KDNodeCopy< PointCopyT >:

Public Member Functions

 G4KDNodeCopy (G4KDTree *tree, const PointCopyT &point, G4KDNode_Base *parent)
 
virtual ~G4KDNodeCopy ()
 
void * operator new (size_t)
 
void operator delete (void *aNode)
 
const PointCopyT & GetPoint ()
 
virtual double operator[] (size_t i) const
 
virtual void InactiveNode ()
 
virtual bool IsValid () const
 
- 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

PointCopyT fPoint
 
G4bool fValid
 
- Protected Attributes inherited from G4KDNode_Base
size_t fAxis
 
int fSide
 
G4KDTreefTree
 
G4KDNode_BasefLeft
 
G4KDNode_BasefRight
 
G4KDNode_BasefParent
 

Private Member Functions

 G4KDNodeCopy (const G4KDNodeCopy< PointCopyT > &right)
 
G4KDNodeCopy< PointCopyT > & operator= (const G4KDNodeCopy< PointCopyT > &right)
 

Static Private Attributes

static G4ThreadLocal G4Allocator< G4KDNodeCopy< PointCopyT > > * fgAllocator
 

Detailed Description

template<typename PointCopyT>
class G4KDNodeCopy< PointCopyT >

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

Definition at line 201 of file G4KDNode.hh.

Constructor & Destructor Documentation

◆ G4KDNodeCopy() [1/2]

template<typename PointCopyT>
G4KDNodeCopy< PointCopyT >::G4KDNodeCopy ( G4KDTree tree,
const PointCopyT &  point,
G4KDNode_Base parent 
)
inline

Definition at line 207 of file G4KDNode.hh.

209  :
210  G4KDNode_Base(tree, parent)
211  {
212  fPoint = point;
213  fValid = true;
214  }
G4bool fValid
Definition: G4KDNode.hh:252
PointCopyT fPoint
Definition: G4KDNode.hh:251
G4KDNode_Base(G4KDTree *, G4KDNode_Base *)
Definition: G4KDNode.cc:72

◆ ~G4KDNodeCopy()

template<typename PointCopyT>
virtual G4KDNodeCopy< PointCopyT >::~G4KDNodeCopy ( )
inlinevirtual

Definition at line 216 of file G4KDNode.hh.

216 {}

◆ G4KDNodeCopy() [2/2]

template<typename PointCopyT>
G4KDNodeCopy< PointCopyT >::G4KDNodeCopy ( const G4KDNodeCopy< PointCopyT > &  right)
inlineprivate

Definition at line 255 of file G4KDNode.hh.

255  :
256  G4KDNode_Base(right), fPoint(0)
257  {
258  fValid = false;
259  }
G4bool fValid
Definition: G4KDNode.hh:252
PointCopyT fPoint
Definition: G4KDNode.hh:251
G4KDNode_Base(G4KDTree *, G4KDNode_Base *)
Definition: G4KDNode.cc:72

Member Function Documentation

◆ GetPoint()

template<typename PointCopyT>
const PointCopyT& G4KDNodeCopy< PointCopyT >::GetPoint ( )
inline

Definition at line 229 of file G4KDNode.hh.

230  {
231  return fPoint;
232  }
PointCopyT fPoint
Definition: G4KDNode.hh:251

◆ InactiveNode()

template<typename PointCopyT>
virtual void G4KDNodeCopy< PointCopyT >::InactiveNode ( )
inlinevirtual

Reimplemented from G4KDNode_Base.

Definition at line 239 of file G4KDNode.hh.

240  {
241  fValid = false;
243  }
G4bool fValid
Definition: G4KDNode.hh:252
virtual void InactiveNode()
Definition: G4KDNode.cc:107
Here is the call graph for this function:

◆ IsValid()

template<typename PointCopyT>
virtual bool G4KDNodeCopy< PointCopyT >::IsValid ( void  ) const
inlinevirtual

Reimplemented from G4KDNode_Base.

Definition at line 245 of file G4KDNode.hh.

246  {
247  return fValid;
248  }
G4bool fValid
Definition: G4KDNode.hh:252

◆ operator delete()

template<typename PointCopyT>
void G4KDNodeCopy< PointCopyT >::operator delete ( void *  aNode)
inline

Definition at line 224 of file G4KDNode.hh.

225  {
227  }
void FreeSingle(Type *anElement)
Definition: G4Allocator.hh:212
static G4ThreadLocal G4Allocator< G4KDNodeCopy< PointCopyT > > * fgAllocator
Definition: G4KDNode.hh:275

◆ operator new()

template<typename PointCopyT>
void* G4KDNodeCopy< PointCopyT >::operator new ( size_t  )
inline

Definition at line 218 of file G4KDNode.hh.

219  {
221  return (void *) fgAllocator->MallocSingle();
222  }
Type * MallocSingle()
Definition: G4Allocator.hh:202
static G4ThreadLocal G4Allocator< G4KDNodeCopy< PointCopyT > > * fgAllocator
Definition: G4KDNode.hh:275
Here is the call graph for this function:

◆ operator=()

template<typename PointCopyT>
G4KDNodeCopy<PointCopyT>& G4KDNodeCopy< PointCopyT >::operator= ( const G4KDNodeCopy< PointCopyT > &  right)
inlineprivate

Definition at line 262 of file G4KDNode.hh.

263  {
264  if(this == &right) return *this;
265  fPoint = right.fPoint;
266  fTree = right.fTree;
267  fLeft = right.fLeft;
268  fRight = right.fRight;
269  fParent = right.fParent;
270  fSide = right.fSide;
271  fAxis = right.fAxis;
272  return *this;
273  }
G4KDNode_Base * fLeft
Definition: G4KDNode.hh:116
size_t fAxis
Definition: G4KDNode.hh:108
PointCopyT fPoint
Definition: G4KDNode.hh:251
G4KDNode_Base * fParent
Definition: G4KDNode.hh:116
G4KDTree * fTree
Definition: G4KDNode.hh:115
G4KDNode_Base * fRight
Definition: G4KDNode.hh:116

◆ operator[]()

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

Implements G4KDNode_Base.

Definition at line 234 of file G4KDNode.hh.

235  {
236  return fPoint[i];
237  }
PointCopyT fPoint
Definition: G4KDNode.hh:251

Member Data Documentation

◆ fgAllocator

template<typename PointCopyT>
G4ThreadLocal G4Allocator< G4KDNodeCopy< PointT > > * G4KDNodeCopy< PointT >::fgAllocator
staticprivate
Initial value:
=
0

Definition at line 275 of file G4KDNode.hh.

◆ fPoint

template<typename PointCopyT>
PointCopyT G4KDNodeCopy< PointCopyT >::fPoint
protected

Definition at line 251 of file G4KDNode.hh.

◆ fValid

template<typename PointCopyT>
G4bool G4KDNodeCopy< PointCopyT >::fValid
protected

Definition at line 252 of file G4KDNode.hh.


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