herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.4
Herwig::Math Namespace Reference

The Math namespace includes the declaration of some useful mathematical functions. More...

Functions

Complex Li2 (Complex)
 The dilog function taken from FORTRAN Herwig.
 
long double ReLi2 (long double)
 The real part of the dilog function taken from FORTRAN Herwig.
 
double angleZeroTo2Pi (double angle)
 Fold angles into the range (0,2 Pi)
 
double angleMinusPiToPi (double angle)
 Fold angles into the range (-Pi,Pi)
 
template<typename T >
median (std::vector< T > v)
 Calculates the (lower) median of a vector of T objects. More...
 

Detailed Description

The Math namespace includes the declaration of some useful mathematical functions.

Function Documentation

◆ median()

template<typename T >
T Herwig::Math::median ( std::vector< T >  v)
inline

Calculates the (lower) median of a vector of T objects.

T has to be comparable, i.e. T::operator< must be defined.

Definition at line 58 of file Maths.h.