Last chance! 50% off unlimited learning
Sale ends in
Center the adjacency matrix by re-weighting edges according to a specified scheme
center_graph(A, scheme = c(-1, 1), use_splr = TRUE)
centered adjacency matrix as a splrMatrix if useSplr = TRUE, otherwise as a Matrix object.
A matrix, an igraph object. Adjacency matrix.
A character vector, number or pair of numbers. Default c(-1, 1)
. See Details.
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 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)
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))
Run the code above in your browser using DataLab