
1 Mar
2013
1 Mar
'13
9:09 a.m.
Steven Watanabe
Did I overlook something or is this just not supported?
This is called std::nth_element.
In Christ, Steven Watanabe
Thx, but are you sure? Median is defined as the middle element in odd distributions but is the average of the 2 middle elements in even distributions. For quartiles (or generalized quantiles) its even worse: there are multiple definitions for quartiles. I even had an article listed 11 definitions of calculating the quartile: http://www.amstat.org/publications/jse/v14n3/langford.html. Still it would have been better if Boost had done the thinking for me :)