Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::anonymous_namespace{nbsearch.cpp}::MindistAction Class Reference

Description

Search action find the minimum distance.

Used as the action for AnalysisNeighborhoodPairSearchImpl::searchNext() to find the nearest neighbor.

With this action, AnalysisNeighborhoodPairSearchImpl::searchNext() always returns false, and the output is put into the variables passed by pointer into the constructor. If no neighbors are found, the output variables are not modified, i.e., the caller must initialize them.

Public Member Functions

 MindistAction (int *closestPoint, real *minDist2, rvec *dx)
 Initializes the action with given output locations. More...
 
 MindistAction (const MindistAction &)=default
 Copies the action.
 
bool operator() (int i, real r2, const rvec dx)
 Processes a neighbor to find the nearest point.
 

Constructor & Destructor Documentation

gmx::anonymous_namespace{nbsearch.cpp}::MindistAction::MindistAction ( int *  closestPoint,
real minDist2,
rvec dx 
)
inline

Initializes the action with given output locations.

Parameters
[out]closestPointIndex of the closest reference location.
[out]minDist2Minimum distance squared.
[out]dxShortest distance vector.

The constructor call does not modify the pointed values, but only stores the pointers for later use. See the class description for additional semantics.


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