semf
average.h
Go to the documentation of this file.
1
10#ifndef SEMF_UTILS_PROCESSING_AVERAGE_H_
11#define SEMF_UTILS_PROCESSING_AVERAGE_H_
12
14
15namespace semf
16{
23template <typename T>
25{
26public:
33 static T value(const T data[], size_t dataSize);
34
40 static T value(const Buffer<T>& data);
41
42private:
51 static T divide(size_t highValue, T lowValue, size_t divider);
52};
53
55template class Average<uint8_t>;
57template class Average<int8_t>;
59template class Average<uint16_t>;
61template class Average<int16_t>;
63template class Average<uint32_t>;
65template class Average<int32_t>;
67template class Average<uint64_t>;
69template class Average<int64_t>;
70} /* namespace semf */
71#endif /* SEMF_UTILS_PROCESSING_AVERAGE_H_ */
Average calculates the average value of the entries of a given Buffer or an data array....
Definition: average.h:25
static T value(const T data[], size_t dataSize)
Calculates an average out of an array.
Definition: average.cpp:15
Buffer is a base class for buffer implementations.
Definition: buffer.h:42