File: time_print.R

package info (click to toggle)
r-cran-igraph 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,044 kB
  • sloc: ansic: 204,981; cpp: 21,711; fortran: 4,090; yacc: 1,229; lex: 519; sh: 52; makefile: 8
file content (54 lines) | stat: -rw-r--r-- 2,363 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

time_group("Printing graphs to the screen")

time_that("Print large graphs without attributes", replications = 10,
          init = { library(igraph); set.seed(42) },
          reinit = { g <- make_lattice(c(1000, 1000)) },
          { print(g) })

time_that("Summarize large graphs without attributes", replications = 10,
          init = { library(igraph); set.seed(42) },
          reinit = { g <- make_lattice(c(1000, 1000)) },
          { summary(g) })

time_that("Print large graphs with large graph attributes",
          replications = 10,
          init = { library(igraph); set.seed(42) },
          reinit = { g <- make_lattice(c(1000, 1000));
                     g <- set_graph_attr(g, "foo", 1:1000000) },
          { print(g) })

time_that("Summarize large graphs with large graph attributes",
          replications = 10,
          init = { library(igraph); set.seed(42) },
          reinit = { g <- make_lattice(c(1000, 1000));
                     g <- set_graph_attr(g, "foo", 1:1000000) },
          { summary(g) })

time_that("Print large graphs with vertex attributes", replications = 10,
          init = { library(igraph); set.seed(42) },
          reinit = { g <- make_lattice(c(1000, 1000));
                     g <- set_vertex_attr(g, 'foo',
                             value = as.character(seq_len(gorder(g)))) },
          { print(g) })

time_that("Summarize large graphs with vertex attributes", replications = 10,
          init = { library(igraph); set.seed(42) },
          reinit = { g <- make_lattice(c(1000, 1000));
                     g <- set_vertex_attr(g, 'foo',
                             value = as.character(seq_len(gorder(g)))) },
          { print(g) })

time_that("Print large graphs with edge attributes", replications = 10,
          init = { library(igraph); set.seed(42) },
          reinit = { g <- make_lattice(c(1000, 1000));
                     g <- set_edge_attr(g, 'foo',
                             value = as.character(seq_len(gsize(g)))) },
          { print(g) })

time_that("Summarize large graphs with edge attributes", replications = 10,
          init = { library(igraph); set.seed(42) },
          reinit = { g <- make_lattice(c(1000, 1000));
                     g <- set_edge_attr(g, 'foo',
                             value = as.character(seq_len(gsize(g)))) },
          { print(g) })