55 template<
typename Po
intT>
class G4KDNode;
100 template<
typename Po
intT>
123 template<
typename Position>
125 const double&
range);
128 void *
operator new(size_t);
129 void operator delete(
void *);
144 template<
typename Position>
147 for (
size_t i = 0; i <
fDim; i++)
166 for (
size_t i = 0; i <
fDim; i++)
173 template<
typename Position>
176 for (
size_t i = 0; i <
fDim; i++)
178 if (pos[i] <
fMin[i])
182 if (pos[i] >
fMax[i])
189 template<
typename Position>
194 for (
size_t i = 0; i <
fDim; i++)
196 if (pos[i] <
fMin[i])
198 result +=
sqr(
fMin[i] - pos[i]);
200 else if (pos[i] >
fMax[i])
202 result +=
sqr(
fMax[i] - pos[i]);
205 if (result >= *bestmatch)
return false;
232 if (
this == &rhs)
return *
this;
241 template<
typename Position>
244 const double& range_sq,
250 template<
typename Position>
254 double *result_dist_sq,
257 template<
typename Position>
261 std::vector<G4KDNode_Base*>&
result,
262 double *result_dist_sq,
277 #include "G4KDTree.icc"
279 #endif // G4KDTREE_HH
void Free(G4KDNode_Base *&)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static G4Allocator< G4KDTree > *& fgAllocator()
void __NearestToPosition(G4KDNode_Base *node, const Position &pos, G4KDNode_Base *&result, double *result_dist_sq, HyperRect *fRect)
static const G4double pos
G4KDTreeResultHandle NearestInRange(const Position &pos, const double &range)
int __NearestInRange(G4KDNode_Base *node, const Position &pos, const double &range_sq, const double &range, G4KDTreeResult &list, int ordered, G4KDNode_Base *source_node=0)
G4KDNode_Base * Insert(PointT *pos)
HyperRect & operator=(const HyperRect &rhs)
HyperRect(const HyperRect &rect)
void Print(std::ostream &out=G4cout) const
void __InsertMap(G4KDNode_Base *node)
void NoticeNodeDeactivation()
const G4ParticleDefinition const G4Material *G4double range
G4KDNode_Base * InsertMap(PointT *pos)
G4KDTreeResultHandle Nearest(const Position &pos)
void SetMinMax(const Position &min, const Position &max)
void Extend(const Position &pos)
bool CompareDistSqr(const Position &pos, const double *bestmatch)
G4double G4ParticleHPJENDLHEData::G4double result
void __NearestToNode(G4KDNode_Base *source_node, G4KDNode_Base *node, const Position &pos, std::vector< G4KDNode_Base * > &result, double *result_dist_sq, HyperRect *fRect, int &nbresult)
G4GLOB_DLL std::ostream G4cout
G4KDNode_Base * GetRoot()
void InactiveNode(G4KDNode_Base *)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
void __Clear_Rec(G4KDNode_Base *node)