#\donttest{
nx<-15; ny<-5;
set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))
M<-c(1,1,1) #try also M<-c(1,2,3)
Nedges = num.edgesAS(Xp,Yp,M)
Nedges
plot(Nedges)
#}
Run the code above in your browser using DataLab