#include <G4KDTree.hh>
Definition at line 129 of file G4KDTree.hh.
◆ HyperRect() [1/2]
G4KDTree::HyperRect::HyperRect |
( |
std::size_t |
dim | ) |
|
|
inline |
◆ ~HyperRect()
G4KDTree::HyperRect::~HyperRect |
( |
| ) |
|
|
inline |
◆ HyperRect() [2/2]
G4KDTree::HyperRect::HyperRect |
( |
const HyperRect & |
rect | ) |
|
|
inline |
Definition at line 154 of file G4KDTree.hh.
155 {
159
160 for(std::size_t i = 0; i <
fDim; ++i)
161 {
162 fMin[i] = rect.fMin[i];
163 fMax[i] = rect.fMax[i];
164 }
165 }
◆ CompareDistSqr()
template<typename Position >
G4bool G4KDTree::HyperRect::CompareDistSqr |
( |
const Position & |
pos, |
|
|
const G4double * |
bestmatch |
|
) |
| |
|
inline |
Definition at line 184 of file G4KDTree.hh.
185 {
187
189 {
191 {
192 result +=
sqr(
fMin[i] - pos[i]);
193 }
194 else if(pos[i] >
fMax[i])
195 {
196 result +=
sqr(
fMax[i] - pos[i]);
197 }
198
199 if(result >= *bestmatch){
200 return false;
201 }
202 }
203
204 return true;
205 }
◆ Extend()
template<typename Position >
void G4KDTree::HyperRect::Extend |
( |
const Position & |
pos | ) |
|
|
inline |
◆ GetDim()
std::size_t G4KDTree::HyperRect::GetDim |
( |
| ) |
|
|
inline |
◆ GetMax()
G4double * G4KDTree::HyperRect::GetMax |
( |
| ) |
|
|
inline |
◆ GetMin()
G4double * G4KDTree::HyperRect::GetMin |
( |
| ) |
|
|
inline |
◆ SetMinMax()
template<typename Position >
void G4KDTree::HyperRect::SetMinMax |
( |
const Position & |
min, |
|
|
const Position & |
max |
|
) |
| |
|
inline |
Definition at line 139 of file G4KDTree.hh.
140 {
142 {
145 }
146 }
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
Referenced by G4KDTree::Build().
◆ fDim
std::size_t G4KDTree::HyperRect::fDim |
|
protected |
◆ fMax
◆ fMin
The documentation for this class was generated from the following file: