#include <G4KDTree.hh>
Definition at line 133 of file G4KDTree.hh.
◆ HyperRect() [1/2]
G4KDTree::HyperRect::HyperRect |
( |
size_t |
dim | ) |
|
|
inline |
◆ ~HyperRect()
G4KDTree::HyperRect::~HyperRect |
( |
| ) |
|
|
inline |
◆ HyperRect() [2/2]
G4KDTree::HyperRect::HyperRect |
( |
const HyperRect & |
rect | ) |
|
|
inline |
Definition at line 159 of file G4KDTree.hh.
160 {
164
165 for (
size_t i = 0; i <
fDim; i++)
166 {
167 fMin[i] = rect.fMin[i];
168 fMax[i] = rect.fMax[i];
169 }
170 }
◆ CompareDistSqr()
template<typename Position >
bool G4KDTree::HyperRect::CompareDistSqr |
( |
const Position & |
pos, |
|
|
const double * |
bestmatch |
|
) |
| |
|
inline |
Definition at line 189 of file G4KDTree.hh.
190 {
191 double result = 0;
192
193 for (
size_t i = 0; i <
fDim; i++)
194 {
195 if (pos[i] <
fMin[i])
196 {
197 result +=
sqr(
fMin[i] - pos[i]);
198 }
199 else if (pos[i] >
fMax[i])
200 {
201 result +=
sqr(
fMax[i] - pos[i]);
202 }
203
204 if (result >= *bestmatch) return false;
205 }
206
207 return true;
208 }
◆ Extend()
template<typename Position >
void G4KDTree::HyperRect::Extend |
( |
const Position & |
pos | ) |
|
|
inline |
◆ GetDim()
size_t G4KDTree::HyperRect::GetDim |
( |
| ) |
|
|
inline |
◆ GetMax()
double * G4KDTree::HyperRect::GetMax |
( |
| ) |
|
|
inline |
◆ GetMin()
double * G4KDTree::HyperRect::GetMin |
( |
| ) |
|
|
inline |
◆ SetMinMax()
template<typename Position >
void G4KDTree::HyperRect::SetMinMax |
( |
const Position & |
min, |
|
|
const Position & |
max |
|
) |
| |
|
inline |
Definition at line 144 of file G4KDTree.hh.
145 {
146 for (
size_t i = 0; i <
fDim; i++)
147 {
150 }
151 }
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
size_t G4KDTree::HyperRect::fDim |
|
protected |
◆ fMax
double * G4KDTree::HyperRect::fMax |
|
protected |
◆ fMin
double* G4KDTree::HyperRect::fMin |
|
protected |
The documentation for this class was generated from the following file: