Skip to content

Documentation request: Address that adding edges one at a time is slower than constructor #35

@AlexanderJCS

Description

@AlexanderJCS

I had a distance matrix (in csv format) with 50 million edges that I needed to convert into a SimpleWeightedGraph. My first approach was to construct the graph edge-by-edge using the add_edge!(v1, v2, weight) function, however this approach would have taken hours or even days to complete the graph.

In an effort to quickly compute the graph, I used the SimpleWeightedGraph(sources, destinations, weights) constructor. This approach was able to complete the graph in less than one minute.

I am suggesting a documentation change to address the speed of the add_edge!(v1, v2, weight) function and the constructor.

Thank you,
Alexander

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