1 #ifndef LIBFASTER_MISC_H
2 #define LIBFASTER_MISC_H
4 #define FDD_TYPE_NULL 0x00
5 #define FDD_TYPE_INT 0x01
11 #include "definitions.h"
24 fddType decodeType(
size_t typeCode);
26 const std::string decodeOptype(fddOpType op);
27 const std::string decodeOptypeAb(fddOpType op);
29 template <
typename T >
30 double mean(std::vector<T> v){
32 for (
size_t i = 0; i < v.size(); ++i)
35 return sum/(double)(v.size());
38 template <
typename T >
39 double max(std::vector<T> v){
41 for (
size_t i = 1; i < v.size(); ++i)
42 m = std::max( m, v[i] );
47 template <
typename T >
48 double stdDev(std::vector<T> v,
double mean){
50 for (
size_t i = 0; i < v.size(); ++i)
51 sum += pow(v[i] - (
double) mean, 2);
53 return ( sqrt( sum/(v.size() - 1) ) );
Definition: _workerFdd.h:11