Skip to main content

๐Ÿ“Š Count

Returns the number of data points pushed in the array.

This is an alias for the inherited point_count() method from DataTomeMvAvg.
Click here to read about the ๐Ÿ“ˆ Point Count method.

๐Ÿ“ Syntaxโ€‹

size_t count() { return this->point_count(); }

๐Ÿ”ฎ Exampleโ€‹

DataTomeMvAvg<int> intAverage(10);

intAverage.push(2);

intAverage.count(); // Will return 1

intAverage.push(5);

intAverage.count(); // Will return 2

โฑ Complexityโ€‹

Constant (O(1)).