N <- 36
n <- 12
x <- seq(1,sqrt(N),1)
X <- expand.grid(x,x)
pik <- rep(n/N,N)
W <- wpik(as.matrix(X),pik,bound = 1,tore = TRUE,shift = FALSE,toreBound = sqrt(N))
W <- W - diag(diag(W))
s <- wave(as.matrix(X),pik,tore = TRUE,shift = TRUE,comment = TRUE)
IB(W,s)
Run the code above in your browser using DataLab