center_graph {iGraphMatch}R Documentation

Center adjacency matrix

Description

Center the adjacency matrix by re-weighting edges according to a specified scheme

Usage

center_graph(A, scheme = c(-1, 1), use_splr = TRUE)

Arguments

A

A matrix, an igraph object. Adjacency matrix.

scheme

A character vector, number or pair of numbers. Default c(-1, 1). See Details.

use_splr

A boolean indicating whether to use the splrMatrix object when storing the centered graph. Defaults to TRUE.

Details

The options for scheme are

Value

centered adjacency matrix as a splrMatrix if useSplr = TRUE, otherwise as a Matrix object.

Examples

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))


[Package iGraphMatch version 2.0.5 Index]