Function indexes_in_vec

Function Documentation

vector<size_t> indexes_in_vec(const double &value, const vector<double> &vec, const float &precision)

Return the vector of indexes of values in vec that match value to the required precision.

Parameters:
  • value – input to be compared to the content of vector

  • vec – the input vector of values to be compared to value

  • precision – the precision with which value must compare to the entries in vector

Returns:

the vector of indexes in vector of the matching values.