Median calculation of a vector of T.