center_graph | R Documentation |
Center the adjacency matrix by re-weighting edges according to a specified scheme
center_graph(A, scheme = c(-1, 1), use_splr = TRUE)
A |
A matrix, an igraph object. Adjacency matrix. |
scheme |
A character vector, number or pair of numbers. Default |
use_splr |
A boolean indicating whether to use the splrMatrix object when storing the centered graph. Defaults to TRUE. |
The options for scheme are
"naive" Returns original A
Integer: Returns A - A_{scheme}
where
A_{scheme}
is the best rank-scheme approximation
of A.
A pair of scalars: Returns s * A + a such that the minimum of the returned matrix is min(scheme) and the maximum is max(scheme).
"center": Same as scheme=c(-1,1)
centered adjacency matrix as a splrMatrix if useSplr = TRUE, otherwise as a Matrix object.
A <- sample_correlated_gnp_pair(n = 10, corr = .5, p = .5)$graph1
center_graph(A, scheme = "naive")
center_graph(A, scheme = "center")
center_graph(A, scheme = 2)
center_graph(A, scheme = c(-4, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.