generator_graph: Simulate several types of graphs

View source: R/gener_data.R

generator_graphR Documentation

Simulate several types of graphs

Description

Simulate several types of graphs

Usage

generator_graph(p = 20, graph = "tree", dens = 0.3, r = 2, k = 3)

Arguments

p

number of nodes

graph

type of graph, among "tree","scale-free","cluster" and "erdos"

dens

graph density (for cluster graphs) or edges probability (for Erdös-Renyi graphs)

r

within/between ratio connection probability (needed for cluster graphs)

k

number of groups in cluster graphs

Value

the adjacency matrix, in sparse format

Examples

generator_graph(p=10,graph="tree")

Rmomal/EMtree documentation built on Dec. 14, 2024, 8:16 a.m.