35 template<
class RealType>
38 const auto nReal =
static_cast<RealType
>(n);
40 const auto divisor = std::tgamma(nReal / 2.0 + 1.0);
41 return std::pow(piSqrt, nReal) / divisor;
50 template<
class RealType>
53 const auto nReal =
static_cast<RealType
>(n);
55 const auto divisor = std::tgamma(nReal / 2.0 + 1.0);
56 return std::pow(piSqrt * radius, nReal) / divisor;
65 template<
class RealType,
class IteratorType>
68 const auto nReal =
static_cast<RealType
>(
std::distance(beginRadii, endRadii));
69 const auto divisor = std::tgamma(nReal / 2.0 + 1.0);
72 for (; beginRadii != endRadii; ++beginRadii)
74 dividend *= *beginRadii;
77 return dividend / divisor;
89 template<
class RealType>
92 const auto nReal =
static_cast<RealType
>(n);
93 const auto divisor = std::tgamma(nReal / 2.0 + 1.0);
95 return std::pow(piSqrt, nReal) * std::pow(equatorialRadius, nReal - 1.0) * polarRadius / divisor;