Add VertexDataGraph and EdgeDataGraph as concrete subtypes of AbstractVertexOrEdgeDataGraph#121
Open
jack-dunham wants to merge 7 commits into
Open
Add VertexDataGraph and EdgeDataGraph as concrete subtypes of AbstractVertexOrEdgeDataGraph#121jack-dunham wants to merge 7 commits into
VertexDataGraph and EdgeDataGraph as concrete subtypes of AbstractVertexOrEdgeDataGraph#121jack-dunham wants to merge 7 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #121 +/- ##
==========================================
- Coverage 59.89% 57.45% -2.44%
==========================================
Files 10 13 +3
Lines 566 818 +252
==========================================
+ Hits 339 470 +131
- Misses 227 348 +121
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This point of this abstract interface is to allow the partial implementation of the
Dictionaries.jlinterface, on these graph types.VertexDataGraphandEdgeDataGraphas concrete subtypes ofAbstractVertexOrEdgeDataGraphAbstractVertexDataGraphandAbstractEdgeDataGraphinterfaces.insert_edge_dataandinsert_vertex_datathat should be overloaded if a given graphisinsertable.A subtype of
AbstractVertexOrEdgeDataGraphimplements a stricter indexing interface, inline with the one used byDictionaries.jl, that issetindex!strictly sets existing indices (doesn't add a vertex/edge that isn't already in the graph). One should useinsert!to strictly add a new vertex/edge with data, andset!to perform anupsert(previous behavior ofsetindex!.Eventually, this interface will be applied to
AbstractDataGraph, but to avoid breaking changes this is deferred until a later date.Subtleties
There is at least one subtlety to the above: The function
copyto!performs a series ofsetindex!operations in the case ofAbstractVertexDataGraph, i.e. the copied vertices must exist in the destination graph, whereas forAbstractEdgeDataGraph,copyto!"upserts" the data, adding the required edges in if they don't exist already. This is in analogy to SparseArrays: