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
13
#include <
semf/utils/core/buffer/buffer.h
>
14
15
namespace
semf
16
{
23
template
<
typename
T>
24
class
Average
25
{
26
public
:
33
static
T
value
(
const
T data[],
size_t
dataSize);
34
40
static
T
value
(
const
Buffer<T>
& data);
41
42
private
:
51
static
T divide(
size_t
highValue, T lowValue,
size_t
divider);
52
};
53
55
template
class
Average<uint8_t>
;
57
template
class
Average<int8_t>
;
59
template
class
Average<uint16_t>
;
61
template
class
Average<int16_t>
;
63
template
class
Average<uint32_t>
;
65
template
class
Average<int32_t>
;
67
template
class
Average<uint64_t>
;
69
template
class
Average<int64_t>
;
70
}
/* namespace semf */
71
#endif
/* SEMF_UTILS_PROCESSING_AVERAGE_H_ */
buffer.h
semf::Average
Average calculates the average value of the entries of a given Buffer or an data array....
Definition:
average.h:25
semf::Average::value
static T value(const T data[], size_t dataSize)
Calculates an average out of an array.
Definition:
average.cpp:15
semf::Buffer
Buffer is a base class for buffer implementations.
Definition:
buffer.h:42
semf
Definition:
batterymodelwithoutdataset.h:18
semf
utils
processing
average.h
Generated by
1.9.4