Find all the paths between two nodes in a graph.
Not all graphs support this function. Currently only
DirectedAcyclicGraph supports this.
See also
Other analyze graphs:
find_path(),
find_path_one_to_many(),
get_all_leaves(),
get_all_roots(),
get_leaves_under(),
get_roots_over(),
least_common_parents()
Examples
graph <- graph_builder() |>
add_path(c("A", "B", "C")) |>
add_path(c("A", "Z", "C")) |>
add_path(c("A", "B", "A")) |>
build_directed()
find_all_paths(graph, "A", "C")
#> [[1]]
#> # of nodes: 3
#> | Nodes |
#> | A |
#> | B |
#> | C |
#>
#>
#> [[2]]
#> # of nodes: 3
#> | Nodes |
#> | A |
#> | Z |
#> | C |
#>
#>