graph.generate: Generate graph

Description Usage Arguments Details Value Examples

View source: R/graph.generate.R

Description

Generate one adjacency matrix according to graphical model.

Usage

1
graph.generate(p, graph = "hub", m = 1, neighb = 2)

Arguments

p

an integer giving the dimension. p should be >= 2.

graph

character. Specify the network structure. Possible network structure are "star" (default), "hub", "banded", "scale-free", "Barabasi-Albert", "small-world", "Watts-Strogatz", "random", "Erdos-Renyi".

m

integer. The number of blocks.

neighb

interger. The neighborhood within which the vertices of the latticewill be connected if graph is "Watt-Strogatz" or "small-world". The number of off-diagonal bands used if graph is "banded".

Details

Generate a "small-world" network according to the Watts-Strogatz network model, "scale-free" network according to the Barabasi-Albert model, "random" network according to the Erdos-Renyi model.

Value

A p*p matrix.

Examples

1
2
3
##------ not run ------
adj <- graph.generate(20, graph = "scale-free", m = 2)
adj

jijiadong/MVDN documentation built on Sept. 6, 2020, 7:15 p.m.