 <p>The function is marked <code>const</code>, so the developer used a rather ugly <code>const_cast</code> to cast the const away in order to call <code>sort</code>.</p> <p><code>ASSERT</code> appears to be a macro (due to it being in capital letters) that most likely calls <a href="http://www.cplusplus.com/reference/cassert/assert/" rel="nofollow">assert</a>, which terminates the program if the expression evaluates to zero.</p> <p>For a summary of what <code>trimmed mean</code> means, refer to this <a href="http://www.d.umn.edu/~yqi/stat3611/trimmed.pdf" rel="nofollow">page</a>.</p> <blockquote> <p>The 10% trimmed mean is the mean computed by excluding the 10% largest and 10% smallest values from the sample and taking the arithmetic mean of the remaining 80% of the sample ...</p> </blockquote>