fastRG: Sample Generalized Random Dot Product Graphs in Linear Time

Samples generalized random product graphs, 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 using the fastRG algorithm of Rohe et al. (2017) <>. 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.

Version: 0.3.2
Depends: Matrix
Imports: dplyr, ellipsis, ggplot2, glue, igraph, methods, RSpectra, stats, tibble, tidygraph, tidyr
Suggests: covr, knitr, magrittr, rmarkdown, testthat (≥ 3.0.0)
Published: 2023-08-21
DOI: 10.32614/CRAN.package.fastRG
Author: Alex Hayes ORCID iD [aut, cre, cph], Karl Rohe [aut, cph], Jun Tao [aut], Xintian Han [aut], Norbert Binkiewicz [aut]
Maintainer: Alex Hayes <alexpghayes at>
License: MIT + file LICENSE
NeedsCompilation: no
Materials: README NEWS
CRAN checks: fastRG results


Reference manual: fastRG.pdf


Package source: fastRG_0.3.2.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): fastRG_0.3.2.tgz, r-oldrel (arm64): fastRG_0.3.2.tgz, r-release (x86_64): fastRG_0.3.2.tgz, r-oldrel (x86_64): fastRG_0.3.2.tgz
Old sources: fastRG archive

Reverse dependencies:

Reverse suggests: gdim


Please use the canonical form to link to this page.