walshavg

void walshavg(double* first, double* last, double* dest);

Computes the Walsh averages of the elements in [first, last) and places them in dest. dest must be large enough to hold all of the n averages (n = k * (k + 1) / 2, where k = last - first).

Parameters:
firstBeginning iterator for the container of elements.
lastEnding iterator for the container of elements.
destBeginning iterator for the destination container.

Returns:
On exit, [dest, dest + n) contains the Walsh averages differences ( n = k * (k + 1) / 2, where k = last - first).

Usage:
double t[5] = {1, 3, 4, 6, 7};
double d[15];
walshavg(t, t + 5, d);

Header:
#include "algorthm.h"