Given a pair of equal length arrays . .
void someFunc (const float **inputChannelData)
{
const float* L = inputChannelData[0];
const float* R = inputChannelData[1];
...
I can see that it is pretty easy to count the number of occurrences of a constant value using std::count
. .
std::count(L, L+someIntegerOffset, 0.0f)
... but is there a standard algorithm (or idiom) that counts the element-wise (same index in each array) number of identical values in two arrays?
A Matlab equivalent would look like sum(L==R)