MCPcopy Create free account
hub / github.com/Gecode/gecode / dev

Function dev

gecode/driver/script.cpp:83–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 double
84 dev(double t[], unsigned int n) {
85 if (n < 2)
86 return 0.0;
87 double m = am(t,n);
88 double s = 0.0;
89 for (unsigned int i=0; i<n; i++) {
90 double d = t[i]-m;
91 s += d*d;
92 }
93 return ::sqrt(s / (n-1)) / m;
94 }
95
96 bool CombinedStop::sigint;
97

Callers 1

runMetaMethod · 0.85

Calls 2

amFunction · 0.85
sqrtFunction · 0.50

Tested by

no test coverage detected