Sample Generalized Random Dot Product Graphs in Linear Time

Samples generalized random product graph, a generalization of a broad class of network models. Given matrices X, S, and Y with with non-negative entries, samples a matrix with expectation X S Y^T and independent Poisson or Bernoulli entries. The algorithm first samples the number of edges and then puts them down one-by-one. As a result it is O(m) where m is the number of edges, a dramatic improvement over element-wise algorithms that which require O(n^2) operations to sample a random graph, where n is the number of nodes.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.0 by Alex Hayes, a year ago

Report a bug at

Browse source code at

Authors: Alex Hayes [aut, cre, cph] , Karl Rohe [aut, cph] , Jun Tao [aut] , Xintian Han [aut] , Norbert Binkiewicz [aut]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports ellipsis, glue, igraph, magrittr, RSpectra, stats, tibble, tidygraph

Depends on Matrix

Suggests covr, dplyr, ggplot2, knitr, rmarkdown, testthat

See at CRAN