Skip to main content

๐Ÿ“ˆ Point Count

Returns the number of data points pushed in the array contributing to the average calculation.

๐Ÿ“ Syntaxโ€‹

size_t point_count();

๐Ÿ”ฎ Exampleโ€‹

DataTomeMvAvg<int> intAverage(10);

intAverage.push(2);

intAverage.point_count(); // Will return 1

intAverage.push(5);

intAverage.point_count(); // Will return 2

โฑ Complexityโ€‹

Constant (O(1)).