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

Refactoring Graph Classes.. #143

Open
krs-world opened this issue May 26, 2023 · 0 comments
Open

Refactoring Graph Classes.. #143

krs-world opened this issue May 26, 2023 · 0 comments
Assignees

Comments

@krs-world
Copy link
Contributor

Suggestion from a User:

Hello,

The GraphAdjMatrix and GraphAdjList classes define several functions with the same or similar signatures. If these two classes were to implement a common interface declaring the shared functions, a single type-safe abstraction invoking one or more of these shared functions could be utilized by an object of either Graph class. Without this, it seems that a separate abstraction invoking the same function(s) needs to be written for an object of each Graph class respectively. Both Graph classes might be utilized in programs with both dense and sparse graphs (example: https://replit.com/@jbasil/gamegraph), so such flexibility may be useful in some contexts.

John

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