22 assert( values.size() );
24 std::sort( vals.begin(), vals.end() );
28 if ( n_vals % 2 == 0 ) {
29 retval += 0.5 * vals[ n_vals / 2 ];
30 retval += 0.5 * vals[ n_vals / 2 + 1];
32 retval = vals[ (n_vals - 1) / 2 + 1 ];
42 for ( iter it = values.begin(),
end = values.end(); it !=
end; ++it ) {
utility::keys::lookup::end< KeyType > const end
numeric::Real median(utility::vector1< numeric::Real > const &values)
Returns the median from a vector1 of Real values.
numeric::Real mean(utility::vector1< numeric::Real > const &values)
std::vector with 1-based indexing
super::const_iterator const_iterator
rosetta project type declarations. Should be kept updated with core/types.hh. This exists because num...
vector1: std::vector with 1-based indexing