Skip to content

Function to compute k shortest paths and return a NetworkX object #1

@annaritz

Description

@annaritz

Function request from one of my students:

k_shortest_paths(networkx_graph, k)

The function will take a NetworkX graph (possibly weighted) and a k and return a list of paths, where each path is represented as a NetworkX object. Perhaps an optional parameter (e.g., output_paths='list') will return the paths as a list.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions