roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.09k stars 213 forks source link

Implement moving histogram algorithm #752

Closed gavv closed 3 months ago

gavv commented 4 months ago

Add a class that implements moving histogram.

The idea is simple:

The new class can be named MovHistogram. Interface should be similar to core::MovStats class, which implements moving minimum, maximum, and variance.

We need a method to add a value, and to get counter value for every bin.

We also need unit tests, you can find example here.

Please use core::RingQueue for ring buffer and core::Array for bins.

This task is needed for #712.

spran180 commented 4 months ago

Hi, I am interested in solving this issue.

gavv commented 4 months ago

@spran180 Welcome, thanks!

gavv commented 3 months ago

What to cover in unit tests, as discussed in #760:

spran180 commented 3 months ago

Hey @gavv,

I'll soon create the pull request including these tests.

gavv commented 3 months ago

Landed