BridgesUNCC / bridges-python

Python client library for Bridges
http://bridgesuncc.github.io
MIT License
2 stars 4 forks source link

Refactoring graph classes #115

Open krs-world opened 1 year ago

krs-world commented 1 year ago

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