vgteam / libhandlegraph

Library for the Handle Graph abstraction
MIT License
20 stars 3 forks source link

allow multigraphs #51

Open ekg opened 4 years ago

ekg commented 4 years ago

Ensuring that edges aren't duplicated can require linear-time operations (in the number of edges). For graphs with some nodes that have very high degree, this quickly becomes a problem.

I propose that we relax the requirement that edges are unique, and instead offer an API call to remove the duplicate edges. This would make it easier to drive bulk loads and rebuilds of graphs where we know that the edge set is unique.

In some of the libbdsg implementations of the API, we don't have a simple mechanism to prevent duplication. Adding one that would be efficient would take a lot of memory.

@jeizenga mentioned this before. I think we should consider supporting it.