Gromacs  2021
 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 largestOkayIndex, 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  largestOkayIndex,
const std::string &  indexUsagePurpose 
)

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

Parameters
[in]indicesto be acessed
[in]largestOkayIndexto be accessed
[in]indexUsagePurposeto be more explicit in the error message
Exceptions
RangeErrorif largestOkayIndex is larger than any element in indices