View source: R/GSD_functions.R
adjmatrix | R Documentation |
This function produces weighted adjacency matrix by Gaussian kernel.
adjmatrix(xy, method = c("dist", "neighbor"), alpha)
xy |
matrix or data.frame containing vertex coordinate |
method |
When |
alpha |
specifies distance between vertices when |
This function produces a sparse weighted adjacency matrix by Gaussian kernel based on the distance between vertices.
a sparse weighted adjacency matrix
Zeng, J., Cheung, G., and Ortega, A. (2017). Bipartite approximation for graph wavelet signal decomposition. IEEE Transactions on Signal Processing, 65(20), 5466–5480. \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1109/TSP.2017.2733489")}
gsignal
, gplot
.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.