Scythe-1.0.3
template<typename T , matrix_order PO, matrix_style PS>
T scythe::median ( const Matrix< T, PO, PS > &  A)

Calculate the median of a Matrix.

This function calculates the median of a matrix by first sorting the elements of the matrix, and then finding the middle element.

Parameters:
AThe matrix whose median is of interest.
See also:
medianc(const Matrix<T,PO,PS> &A)
mean(const Matrix<T,PO,PS> &A)
mode(const Matrix<T,PO,PS> &A)

References scythe::Matrix< T_type, ORDER, STYLE >::begin(), scythe::Matrix< T_type, ORDER, STYLE >::end(), floor(), scythe::Matrix_base< ORDER, STYLE >::size(), and sort().