PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
Average< T > Class Template Referencefinal

Public Member Functions

Modifiers
Averageoperator+= (const T &_value) noexcept
 
AverageAddSummedValues (const T &_sum, const size_t _count) noexcept
 
Queries
Get () const noexcept
 Get the average.
 
const T & Sum () const noexcept
 Get the total sum.
 
size_t Count () const noexcept
 Get the number of elements included.
 

Detailed Description

template<typename T>
class Average< T >

Keep a running total and count of any type which supports addition and division.

Member Function Documentation

◆ operator+=()

template<typename T >
Average< T > & Average< T >::operator+= ( const T &  _value)
noexcept

Add an element to the average.

Parameters
_valueThe element to add.
Returns
A reference to self.

◆ AddSummedValues()

template<typename T >
Average< T > & Average< T >::AddSummedValues ( const T &  _sum,
const size_t  _count 
)
noexcept

Add one or more elements (pre-summed) to the average.

Parameters
_sumThe summed elements to add.
_countThe number of elements.
Returns
A reference to self.

The documentation for this class was generated from the following file: