Skip to content

Refactoring Graph Classees.. #182

Description

@krs-world

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions