Gromacs
2022

#include <gromacs/selection/nbsearch.h>
Value type to represent a pair of positions found in neighborhood searching.
Methods in this class do not throw.
Public Member Functions  
AnalysisNeighborhoodPair ()  
Initializes an invalid pair.  
AnalysisNeighborhoodPair (int refIndex, int testIndex, real distance2, const rvec dx)  
Initializes a pair object with the given data.  
bool  isValid () const 
Whether this pair is valid. More...  
int  refIndex () const 
Returns the index of the reference position in the pair. More...  
int  testIndex () const 
Returns the index of the test position in the pair. More...  
real  distance2 () const 
Returns the squared distance between the pair of positions.  
const rvec &  dx () const 
Returns the shortest vector between the pair of positions. More...  

inline 
Returns the shortest vector between the pair of positions.
The vector is from the test position to the reference position.

inline 
Whether this pair is valid.
If isValid() returns false, other methods should not be called.

inline 
Returns the index of the reference position in the pair.
This index is always the index into the position array provided to AnalysisNeighborhood::initSearch().

inline 
Returns the index of the test position in the pair.
The contents of this index depends on the context (method call) that produces the pair. If there was no array in the call, this index is zero.