Learn R Programming

graphonmix (version 0.0.1.0)

scale_graphon: Scales a graphon to an nxn matrix

Description

Scales a graphon to an nxn matrix suitable for large adjacency matrices

Usage

scale_graphon(W, n)

Value

Scaled nxn graphon

Arguments

W

A graphon given as a symmetric square matrix

n

The dimension of the output matrix

Examples

Run this code
library(igraph)
gr <- sample_gnp(1000, p=0.2)
adj <- as_adjacency_matrix(gr)
W <- scale_graphon(adj, 100)

Run the code above in your browser using DataLab