tests/testthat/_snaps/graph.bfs.md

snapshot test

Code
  g <- graph_from_literal(a - +b - +c)
  bfs(g, root = 2, mode = "out", unreachable = FALSE, order = TRUE, rank = TRUE,
    father = TRUE, pred = TRUE, succ = TRUE, dist = TRUE)
Output
  $root
  [1] 2

  $mode
  [1] "out"

  $order
  + 3/3 vertices, named:
  [1] b    c    <NA>

  $rank
    a   b   c 
  NaN   1   2

  $father
  + 3/3 vertices, named:
     a    b    c 
  <NA> <NA>    b

  $pred
  + 3/3 vertices, named:
     a    b    c 
  <NA> <NA>    b

  $succ
  + 3/3 vertices, named:
     a    b    c 
  <NA>    c <NA>

  $dist
    a   b   c 
  NaN   0   1

  $neimode
  [1] "out"


Try the igraph package in your browser

Any scripts or data that you put into this service are public.

igraph documentation built on Aug. 10, 2023, 9:08 a.m.