1.1. igraph_running_mean — Calculates the running mean of a vector.

int igraph_running_mean(const igraph_vector_t *data, igraph_vector_t *res, 
			igraph_integer_t binwidth);

The running mean is defined by the mean of the previous binwidth values.

Arguments: 

data:

The vector containing the data.

res:

The vector containing the result. This should be initialized before calling this function and will be resized.

binwidth:

Integer giving the width of the bin for the running mean calculation.

Returns: 

Error code.

Time complexity: O(n), n is the length of the data vector.