Skip to content

BFS question for directed graph #422

Open
@kenahoo

Description

@kenahoo

Is there a way to run a BFS search on a directed graph, but traversing edges in either direction (essentially treating it as an undirected graph)? My use case is that the directions on edges are more like edge orientations than traversal limitations - they indicate the meaning of positive or negative flow on that edge, but are otherwise unimportant to adjacency.

Also, would it be possible to add an example or two of doing a BFS (and/or DFS) traversal on a graph? I'm not quite seeing how to use the bfs_parents and bfs_tree methods in practice.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions