Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
AlexanderJCS opened this issue Mar 12, 2023 · 1 comment

Comments

@AlexanderJCS
Copy link

AlexanderJCS commented Mar 12, 2023

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

@gdalle
Copy link
Member

gdalle commented Apr 5, 2023

Solved by #38

@gdalle gdalle closed this as completed Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants