Container-combinatorics utils
Detailed DescriptionFunction Documentation◆ closestMatchIndex() [1/3]
template<typename CONTAINER , typename T , typename FN = double(const typename std::decay_t<CONTAINER>::value_type&, const std::decay_t<T>&), typename = isCIterable<CONTAINER>>
Return the index from a vector which best matches fn(c[i], x) to the target value. A NaN return from the function will be counted as a no-match, as will combinations giving a value outside the given minval .. maxval range. A -1 index is returned in the case that no valid match is found.
References Rivet::closestMatchIndices(). ◆ closestMatchIndex() [2/3]
template<typename CONTAINER , typename FN = double(const typename std::decay_t<CONTAINER>::value_type&), typename = isCIterable<CONTAINER>>
Return the index from a vector which best matches fn(c[i]) to the target value. A NaN return from the function will be counted as a no-match, as will combinations giving a value outside the given minval .. maxval range. A -1 index is returned in the case that no valid match is found. References Rivet::DBL_NAN. Referenced by Rivet::closestMassIndex(), Rivet::closestMassIndex(), and Rivet::closestMatchIndex(). ◆ closestMatchIndex() [3/3]
template<typename CONTAINER , typename T , typename FN , typename = isCIterable<CONTAINER>>
Return the index from a vector which best matches fn(x, c[j]) to the target value. A NaN return from the function will be counted as a no-match, as will combinations giving a value outside the given minval .. maxval range. A -1 index is returned in the case that no valid match is found.
References Rivet::closestMatchIndex(). ◆ closestMatchIndices()
template<typename CONTAINER1 , typename CONTAINER2 , typename FN = double(const typename std::decay_t<CONTAINER1>::value_type&, const typename std::decay_t<CONTAINER2>::value_type&), typename = isCIterable<CONTAINER1, CONTAINER2>>
Return the indices from two vectors which best match fn(c1[i], c2[j]) to the target value. A NaN return from the function will be counted as a no-match, as will combinations giving a value outside the given minval .. maxval range. A {-1,-1} pair is returned in the case that no valid match is found.
References Rivet::DBL_NAN. Referenced by Rivet::closestMassIndices(), and Rivet::closestMatchIndex(). Generated on Wed Oct 30 2024 15:42:55 for Rivet by 1.9.8 |