Gromacs  2025-dev-20240913-b871546
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
gmx::anonymous_namespace{gmx_covar.cpp} Namespace Reference

Functions

void throwErrorIfIndexOutOfBounds (ArrayRef< const int > indices, const int numAtoms, const std::string &indexUsagePurpose)
 Throw an error if any element in index exceeds a given number. More...
 

Function Documentation

void gmx::anonymous_namespace{gmx_covar.cpp}::throwErrorIfIndexOutOfBounds ( ArrayRef< const int >  indices,
const int  numAtoms,
const std::string &  indexUsagePurpose 
)

Throw an error if any element in index exceeds a given number.

Parameters
[in]indicesto be acessed
[in]numAtomsto be accessed
[in]indexUsagePurposeto be more explicit in the error message
Exceptions
RangeErrorif any element in indices is larger than or equal numAtoms