17#ifndef __math_welch_satterthwaite_h__
18#define __math_welch_satterthwaite_h__
27 template <
class VarArrayType,
class CountArrayType>
30 assert (
size_t(variances.size()) ==
size_t(counts.size()));
32 for (
size_t i = 0; i != size_t(variances.size()); ++i) {
33 const default_type ks2 = (1.0 / (counts[i] - 1)) * variances[i];
35 denominator +=
Math::pow2 (ks2) / (counts[i] - 1);
constexpr T pow2(const T &v)
default_type welch_satterthwaite(const VarArrayType &variances, const CountArrayType &counts)
double default_type
the default type used throughout MRtrix