adjmatrix {GSD} | R Documentation |
Weighted Adjacency Matrix
Description
This function produces weighted adjacency matrix by Gaussian kernel.
Usage
adjmatrix(xy, method = c("dist", "neighbor"), alpha)
Arguments
xy |
matrix or data.frame containing vertex coordinate |
method |
When |
alpha |
specifies distance between vertices when |
Details
This function produces a sparse weighted adjacency matrix by Gaussian kernel based on the distance between vertices.
Value
a sparse weighted adjacency matrix
References
Zeng, J., Cheung, G., and Ortega, A. (2017). Bipartite approximation for graph wavelet signal decomposition. IEEE Transactions on Signal Processing, 65(20), 5466–5480. doi:10.1109/TSP.2017.2733489
See Also
Examples
## define vertex coordinate
x <- y <- seq(0, 1, length=30)
xy <- expand.grid(x=x, y=y)
## weighted adjacency matrix by Gaussian kernel
## for connecting vertices within distance 0.04
A1 <- adjmatrix(xy, method = "dist", 0.04)
## weighted adjacency matrix by Gaussian kernel
## for connecting seven neighboring vertices
A2 <- adjmatrix(xy, method="neighbor", 7)