2
3
4
5
6
7
8
9
10
11
12
13
14
15
19#include "core/clockwerkerrors.h"
20#include "core/safemath.hpp"
25 int mean(T* array,
unsigned int size, T& result) {
28 for(
unsigned int i = 0; i < size; i++) {
33 return clockwerk::safeDivide(sum, (T)size, result);
37 int variance(T* array,
unsigned int size, T& result) {
39 int err = mean(array, size, result);
45 for(
unsigned int i = 0; i < size; i++) {
51 return clockwerk::safeDivide(sum, (T)(size - 1), result);
55 int stdev(T* array,
unsigned int size, T& result) {
57 int err = variance(array, size, result);
61 err = clockwerk::safeSqrt((
double)result, tmp);
67 int max(T* array,
unsigned int size, T& result) {
74 for(
unsigned int i = 0; i < size; i++) {
85 int min(T* array,
unsigned int size, T& result) {
92 for(
unsigned int i = 0; i < size; i++) {
#define NO_ERROR
Definition clockwerkerrors.h:31
#define ERROR_DIMENSIONS
Definition clockwerkerrors.h:38
Class to propagate CR3BP dynamics in characteristic units.
Definition ConfigurationWriter.cpp:18