generate_graph.sbm: draw a random graph from a 4group_oneparam_simple stochastic...

Description Usage Arguments Details Value

View source: R/stochastic_block_model.R

Description

Draw a random graph from a stochastic blockmodel using a k-vector of block sizes and a k x k preference matrix

Usage

1
2
## S3 method for class 'sbm'
generate_graph(params)

Arguments

params

a list containing block.sizes, pref.matrix, and optionally block.names

Details

This routine is agnostic about the algorithm that was used to produce the preference matrix and the block sizes, so it could potentially be used with a lot of different models.

The igraph object that gets returned is a graph drawn from the stochastic block-model. The vertices each have a 'group' attribute containing the name of the block they have been assigned to. These block names default to 'group.1', 'group.2', ... if none are specified.

Value

the igraph object with each vertex's group membership given by a vertex attribute


dfeehan/nrsimulatr documentation built on June 12, 2018, 4:27 a.m.