Hello everyone, I'm stuck with naming once again.
I'm developing a module for approximate descriptive statistics. I'm trying to follow the interface of Statisitcs::Descriptive::Full as close as possible. As an exception, I've added central and standardized moments: central_moment($n); # == <(x-<x>)**n> std_moment($n); # == <(x-<x>)**n>/sigma**n -- but these seem unambiguous enough. (Or should I stick with standardized_moment() instead?) But now, I'm looking for a good name for a method that integrates arbitrary function over part of the sample. My current API looks like $stat->sum_of($coderef, $min, $max); # add up $coderef->($x) # for part of sample between $min and $max $stat->mean_of($coderef, $min, $max); # trimmed expectation # of $coderef->($x) $stat->integral_of($coderef, $min, $max); # integrate f(x)*P(x)*dx # where P is probability density (not done yet) Does sum_of(...) count as a good, descriptive name? What about others? Note: I'm NOT proposing any changes to Statistics::Descriptive itself! However, I'd like to be consistent with the rest of the pack (S::D::Full, S::D::Discrete, etc) for as long as possible in the future. -- WBR, Konstantin S. Uvarin