Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4KDTreeResult Class Reference

#include <G4KDTreeResult.hh>

Inheritance diagram for G4KDTreeResult:
Collaboration diagram for G4KDTreeResult:

Public Member Functions

 G4KDTreeResult (G4KDTree *)
 
virtual ~G4KDTreeResult ()
 
voidoperator new (size_t)
 
void operator delete (void *)
 
void Insert (double, G4KDNode_Base *)
 
void Clear ()
 
void Sort ()
 
size_t GetSize () const
 
size_t size () const
 
void Rewind ()
 
bool End ()
 
void Next ()
 
template<typename PointT >
PointT * GetItem () const
 
G4KDNode_BaseGetNode () const
 
template<typename PointT >
PointT * GetItemNDistanceSQ (double &) const
 
double GetDistanceSqr () const
 

Protected Attributes

G4KDTreefTree
 
KDTR_parent::iterator fIterator
 

Detailed Description

Definition at line 70 of file G4KDTreeResult.hh.

Constructor & Destructor Documentation

G4KDTreeResult::G4KDTreeResult ( G4KDTree tree)

Definition at line 84 of file G4KDTreeResult.cc.

84  :
85 //std::list<ResNode>()
87 {
88  fTree = tree;
89 }
#define KDTR_parent
G4KDTree * fTree
G4KDTreeResult::~G4KDTreeResult ( )
virtual

Definition at line 91 of file G4KDTreeResult.cc.

92 {
93  KDTR_parent::erase(begin(),end());
94  //std::list<ResNode>::erase(begin(),end());
95 }

Member Function Documentation

void G4KDTreeResult::Clear ( )

Definition at line 103 of file G4KDTreeResult.cc.

104 {
105 // std::list<ResNode>::erase(begin(),end());
106 // fIterator = std::list<ResNode>::begin();
107  KDTR_parent::erase(begin(),end());
108  fIterator = KDTR_parent::begin();
109 }
KDTR_parent::iterator fIterator
bool G4KDTreeResult::End ( )

Definition at line 134 of file G4KDTreeResult.cc.

135 {
136  return (fIterator == end());
137 }
KDTR_parent::iterator fIterator
double G4KDTreeResult::GetDistanceSqr ( ) const

Definition at line 144 of file G4KDTreeResult.cc.

145 {
146  return (*fIterator).GetDistanceSqr();
147 }

Here is the caller graph for this function:

template<typename PointT >
PointT * G4KDTreeResult::GetItem ( ) const

Definition at line 140 of file G4KDTreeResult.hh.

141  {
143  return node->GetPoint();
144  }
PointT * GetPoint()
Definition: G4KDNode.hh:148
G4KDNode_Base * GetNode() const

Here is the call graph for this function:

template<typename PointT >
PointT * G4KDTreeResult::GetItemNDistanceSQ ( double &  dist_sq) const

Definition at line 147 of file G4KDTreeResult.hh.

148  {
149  dist_sq = GetDistanceSqr();
150  return this->GetItem<PointT>();
151  }
double GetDistanceSqr() const

Here is the call graph for this function:

G4KDNode_Base * G4KDTreeResult::GetNode ( ) const

Definition at line 149 of file G4KDTreeResult.cc.

149  {
150  return (*fIterator).GetNode();
151 }

Here is the caller graph for this function:

size_t G4KDTreeResult::GetSize ( ) const

Definition at line 117 of file G4KDTreeResult.cc.

118 {
119  //return std::list<ResNode>::size();
120  return KDTR_parent::size();
121 }
void G4KDTreeResult::Insert ( double  dis_sq,
G4KDNode_Base node 
)

Definition at line 97 of file G4KDTreeResult.cc.

98 {
99  //std::list<ResNode>::push_back(ResNode(dis_sq,node));
100  KDTR_parent::push_back(ResNode(dis_sq,node));
101 }
void G4KDTreeResult::Next ( )

Definition at line 139 of file G4KDTreeResult.cc.

140 {
141  ++fIterator;
142 }
KDTR_parent::iterator fIterator
void G4KDTreeResult::operator delete ( void object)
inline

Definition at line 134 of file G4KDTreeResult.hh.

135 {
136  aKDTreeAllocator->FreeSingle((G4KDTreeResult *) object);
137 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4KDTreeResult > * aKDTreeAllocator
void * G4KDTreeResult::operator new ( size_t  )
inline

Definition at line 128 of file G4KDTreeResult.hh.

129 {
131  return (void *) aKDTreeAllocator->MallocSingle();
132 }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4KDTreeResult > * aKDTreeAllocator
void G4KDTreeResult::Rewind ( )

Definition at line 129 of file G4KDTreeResult.cc.

130 {
131  fIterator = begin();
132 }
KDTR_parent::iterator fIterator

Here is the caller graph for this function:

size_t G4KDTreeResult::size ( ) const

Definition at line 123 of file G4KDTreeResult.cc.

124 {
125  return KDTR_parent::size();
126  //return std::list<ResNode>::size();
127 }
void G4KDTreeResult::Sort ( )

Definition at line 111 of file G4KDTreeResult.cc.

112 {
113  //std::list<ResNode>::sort(CompareResNode);
114  std::sort(begin(), end(), CompareResNode);
115 }
bool CompareResNode(const ResNode &left, const ResNode &right)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

KDTR_parent::iterator G4KDTreeResult::fIterator
protected

Definition at line 75 of file G4KDTreeResult.hh.

G4KDTree* G4KDTreeResult::fTree
protected

Definition at line 73 of file G4KDTreeResult.hh.


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