Auxiliary class for determination of smallest distance between pair of 3D points.  
 More...
#include <JGeometry3DToolkit.hh>
 | 
| template<class T >  | 
| static double  | getDmin (T __begin, T __end) | 
|   | Recursive method to find the smallest distance.  More...
  | 
|   | 
Auxiliary class for determination of smallest distance between pair of 3D points. 
Definition at line 130 of file JGeometry3DToolkit.hh.
 
◆ JSmallestDistance3D()
  
  
      
        
          | JGEOMETRY3D::JSmallestDistance3D::JSmallestDistance3D  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ getDmin()
template<class T > 
  
  
      
        
          | static double JGEOMETRY3D::JSmallestDistance3D::getDmin  | 
          ( | 
          T  | 
          __begin,  | 
         
        
           | 
           | 
          T  | 
          __end  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestaticprotected   | 
  
 
Recursive method to find the smallest distance. 
- Parameters
 - 
  
    | __begin | begin of data  | 
    | __end | end of data  | 
  
   
- Returns
 - minimal distance 
 
Definition at line 140 of file JGeometry3DToolkit.hh.
  144       const int N = 
distance(__begin, __end);
 
  148         double Dmin = numeric_limits<double>::max();
 
  150         for (T i = __begin; i != __end; ++i) {
 
  151           for (T 
j = i; ++
j != __end; ) {
 
  169         const double dl   = 
getDmin(__begin, i);
 
  170         const double dr   = 
getDmin(i,   __end);
 
  172         const double Dmin = min(dl, dr);
 
  177         while (--il != __begin && i ->getZ() - il->getZ() < Dmin) {}
 
  178         while (++ir != __end   && ir->getZ() - i ->getZ() < Dmin) {}
 
  184         return min(Dmin, dz);
 
 
 
 
◆ operator()()
template<class T > 
  
  
      
        
          | double JGEOMETRY3D::JSmallestDistance3D::operator()  | 
          ( | 
          T  | 
          __begin,  | 
         
        
           | 
           | 
          T  | 
          __end  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inline   | 
  
 
Get smallest distance between two points. 
Note that this method changes the order of the elements.
- Parameters
 - 
  
    | __begin | begin of data  | 
    | __end | end of data  | 
  
   
- Returns
 - minimal distance 
 
Definition at line 228 of file JGeometry3DToolkit.hh.
  234       return getDmin(__begin, __end);
 
 
 
 
◆ compareZ
  
  
      
        
          | const JCompareZ JGEOMETRY3D::JSmallestDistance3D::compareZ | 
         
       
   | 
  
static   | 
  
 
 
The documentation for this class was generated from the following file:
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.