Accord.Statistics.Circular.CentralMoments C# (CSharp) Method

CentralMoments() public static method

Computes the complex circular central moments of the given circular angles.
public static CentralMoments ( double angles, int order ) : Complex
angles double
order int
return Complex
        public static Complex CentralMoments(double[] angles, int order)
        {
            double theta = Mean(angles);
            double v = angles.Length / theta;
            double[] alpha = new double[angles.Length];

            for (int i = 0; i < alpha.Length; i++)
                alpha[i] = Distance(angles[i], v);

            return NoncentralMoments(angles, order);
        }