Skip to content

Commit 0c5d90e

Browse files
committed
Speed up examples
1 parent 01f82aa commit 0c5d90e

5 files changed

Lines changed: 15 additions & 30 deletions

File tree

R/sample_edgelist.R

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,18 @@
103103
#'
104104
#' ##### directed examples ----------------------------
105105
#'
106-
#' n2 <- 10000
106+
#' n2 <- 1000
107107
#'
108108
#' k1 <- 5
109109
#' k2 <- 3
110110
#'
111-
#' d <- 5000
111+
#' d <- 500
112112
#'
113113
#' X <- matrix(rpois(n = n2 * k1, 1), nrow = n2)
114114
#' S <- matrix(runif(n = k1 * k2, 0, .1), nrow = k1, ncol = k2)
115115
#' Y <- matrix(rexp(n = k2 * d, 1), nrow = d)
116116
#'
117-
#' fm <- directed_factor_model(X, S, Y, expected_in_degree = 50)
117+
#' fm <- directed_factor_model(X, S, Y, expected_in_degree = 20)
118118
#' fm
119119
#'
120120
#' ### sampling graphs as edgelists ----------------------
@@ -146,13 +146,10 @@
146146
#' # you please open an issue and we can investigate speedups
147147
#'
148148
#' dig <- sample_igraph(fm)
149-
#'
150149
#' is_bipartite(dig)
151150
#'
152151
#' ### sampling graphs as tidygraph graphs ---------------
153152
#'
154-
#' sample_tidygraph(fm)
155-
#'
156153
#' sample_tidygraph(fm, poisson_edges = FALSE)
157154
#'
158155
sample_edgelist <- function(

man/sample_edgelist.Rd

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sample_igraph.Rd

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sample_sparse.Rd

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sample_tidygraph.Rd

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)