Gromacs  2016.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::AnalysisNeighborhoodPair Class Reference

#include <gromacs/selection/nbsearch.h>

Description

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...
 

Member Function Documentation

const rvec& gmx::AnalysisNeighborhoodPair::dx ( ) const
inline

Returns the shortest vector between the pair of positions.

The vector is from the test position to the reference position.

bool gmx::AnalysisNeighborhoodPair::isValid ( ) const
inline

Whether this pair is valid.

If isValid() returns false, other methods should not be called.

int gmx::AnalysisNeighborhoodPair::refIndex ( ) const
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().

int gmx::AnalysisNeighborhoodPair::testIndex ( ) const
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.


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