centmom

double centmom(double* first, double* last, double n);

Returns the n-th central moment of the elements in [first, last).

Parameters:
firstBeginning iterator for the container of elements.
lastEnding iterator for the container of elements.
nCentral moment to compute.

Returns:
n-th central moment

Usage:
int s[4] = {1, 2, 3, 4};
double ss = centmom(s, s + 4, 2.0);

Header:
#include "descript.h"