-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better functionality for PartitionedGraph #45
Better functionality for PartitionedGraph #45
Conversation
Thanks. I prefer I agree with renaming I would call them |
Yeah I am happy with that naming. The only issue is that we also have Maybe we could just call it |
I see, yeah that is an unfortunate name clash. I don't like The problem seems to basically be that when reading One way out could be to call the function that partitions the vertices with |
Okay will go with |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
==========================================
- Coverage 78.83% 77.70% -1.14%
==========================================
Files 31 31
Lines 1167 1184 +17
==========================================
Hits 920 920
- Misses 247 264 +17 ☔ View full report in Codecov by Sentry. |
Looks good, thanks. Could you add tests for the new functions? |
Something I realized is that I think the snake casing in I think removing the snake casing, i.e. changing to I'm on the fence about that since we use snake casing in other functions, let me know what you think. |
I think |
Yeah, I think that is a more succinct reason for using the style |
Okay great. I have gone with that naming convention for now! I also added further testing. |
Looks good, thanks! |
This PR adds improved functionality and function naming for the
PartitionedGraph
type.Firstly, we add support for
reverse(pe::PartitionedEdge)
which previously required the user to unwrap and wrap the edge again.Secondly, there is proper support for getting edges out of a
PartitionedGraph
.New functions in this domain:
partition_edge(pg, edge)
is renamedwhich_partitionedge(pg, edge::AbstractEdge)
to be more consistent with the naming of the vertex versionwhich_partition(pg, vertex)
.which_partitionedges(pg, edges)
andwhich_partitions(pg, vertices)
have been added to support the vectorized version of those functionspartition_edges(pg, pe::PartitionEdge)
is renamededges(pg, pe::PartitionEdge)
(and a vectorized version is added) to be more clear about the return typepartitionedges(pg)
andpartitionvertices(pg)
is added to just return the lists of edges and vertices of thepartitioned_graph(pg)
(wrapped in thePartitionEdge
andPartitionVertex
type)These functions are exported.