herwig is hosted by Hepforge, IPPP Durham
 Herwig  7.1.5
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.

## ◆ 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.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6289235,"math_prob":0.72377616,"size":630,"snap":"2019-35-2019-39","text_gpt3_token_len":157,"char_repetition_ratio":0.12619808,"word_repetition_ratio":0.2857143,"special_character_ratio":0.23968254,"punctuation_ratio":0.1388889,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99649704,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-20T10:27:07Z\",\"WARC-Record-ID\":\"<urn:uuid:0fe06635-1663-4e4d-a652-dd2bc90b6993>\",\"Content-Length\":\"8928\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:71a2f3a6-5325-4021-ad51-ac640f31d662>\",\"WARC-Concurrent-To\":\"<urn:uuid:93515bc2-b26d-496c-b76e-e85805ffc074>\",\"WARC-IP-Address\":\"129.234.186.186\",\"WARC-Target-URI\":\"https://herwig.hepforge.org/doxygen/namespaceHerwig_1_1Math.html\",\"WARC-Payload-Digest\":\"sha1:4VI34735ULTIPB4KB7IK2EBYEDAZVSMU\",\"WARC-Block-Digest\":\"sha1:FRR3MPTWT6VTTBYGUHISGRYHKVCEZAZC\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514573988.33_warc_CC-MAIN-20190920092800-20190920114800-00132.warc.gz\"}"}