You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: