Calculates the kernel matrix, described in BKS2020USP for
univariate continuous data when using the Fourier basis.
This function is used in USPFourier.
Usage
FourierKernel(x, M)
Arguments
x
A vector in \([0,1]^n\) for some \(n\), containing the observations.
M
The maximum frequency of Fourier basis functions to compute.
Value
The kernel matrix \(K\), to be used in independence testing.