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

Add support for undirected graphs? #14

Open
wylee opened this issue Oct 21, 2019 · 1 comment
Open

Add support for undirected graphs? #14

wylee opened this issue Oct 21, 2019 · 1 comment
Assignees

Comments

@wylee
Copy link
Owner

wylee commented Oct 21, 2019

It's currently possible to create an undirected graph by adding edges from both u to v and v to u for all connected pairs (u, v). This requires a bit of extra space and more effort to set up.

The simplest solution I can think of is to add an undirected flag to Graph. When enabled, (v, u) would be added automatically when (u, v) is added. This would still require extra space but wouldn't require any other changes (e.g., to the shortest path algorithm).

@wylee wylee self-assigned this Oct 21, 2019
wylee added a commit that referenced this issue Nov 8, 2019
@elliotwutingfeng
Copy link
Contributor

This can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants