My data : There are 2 neighbours: 31 and 32. I wish to remove them and keep only the mean value (e.g. 31.5), in such a way data would be :
I see that iterator_traits always defines a difference_type: https://en.cppreference.com/w/cpp/iterator/iterator_traits#Member_types
Suppose I have this data:I want to recover the indices beginning where there are more than 3 zeroes in a row and terminating with the last 0 before a nonzero.