Learn R Programming

graphonmix (version 0.0.1.0)

sample_graphon: Generates a graph given a graphon

Description

Generates a graph given a dense graphon W.

Usage

sample_graphon(W, n)

Value

A graph sampled from the graphon W with n nodes

Arguments

W

A graphon given by a matrix

n

The number of nodes of the sampled graph

Examples

Run this code
library(igraph)
W <- matrix(0.2, nrow = 100, ncol = 100)
gr <- sample_graphon(W, n= 100)

Run the code above in your browser using DataLab