Several methods of continous-time multivariate analysis require a matrix of
inner products of pairs of centered functions from a basis, such as a B-spline basis,
or pairs consisting of one function from each of two bases. This function computes
such matrices via 7-point Newton-Cotes integration, which is exact for cubic
B-splines. For a Fourier basis with the inner product taken over the entire range,
a simple closed form is used instead of integration.