-
Notifications
You must be signed in to change notification settings - Fork 4
[PartitionedGraphs] Rename various types and functions to improve clarity. #110
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
Draft
jack-dunham
wants to merge
6
commits into
ITensor:main
Choose a base branch
from
jack-dunham:rename
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e45385a
Rename `PartitionsGraphView` -> `QuotientGraph` and `partitions_graph…
609c855
Rename `PartitionVertex` -> `SuperVertex` and `PartitionEdge` -> `Sup…
c8805cd
Remove some duplicate methods overwriting each other
345ef6b
Version bump
c412e31
Remove `quotient_graph` function in favour of a direct call to `Quoti…
2791da4
Runic formatting
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| name = "NamedGraphs" | ||
| uuid = "678767b0-92e7-4007-89e4-4527a8725b19" | ||
| authors = ["Matthew Fishman <[email protected]>, Joseph Tindall <[email protected]> and contributors"] | ||
| version = "0.7.4" | ||
| version = "0.8.0" | ||
|
|
||
| [deps] | ||
| AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" | ||
|
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| module PartitionedGraphs | ||
| include("abstractpartitionvertex.jl") | ||
| include("abstractpartitionedge.jl") | ||
| include("abstractsupervertex.jl") | ||
| include("abstractsuperedge.jl") | ||
| include("abstractpartitionedgraph.jl") | ||
| include("partitionvertex.jl") | ||
| include("partitionedge.jl") | ||
| include("supervertex.jl") | ||
| include("superedge.jl") | ||
| include("partitionedgraph.jl") | ||
| include("partitionsgraphview.jl") | ||
| include("quotientgraph.jl") | ||
| end |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| using Graphs: Graphs | ||
| using ..NamedGraphs: AbstractNamedEdge | ||
|
|
||
| abstract type AbstractSuperEdge{V} <: AbstractNamedEdge{V} end | ||
|
|
||
| Base.parent(se::AbstractSuperEdge) = not_implemented() | ||
| Graphs.src(se::AbstractSuperEdge) = not_implemented() | ||
| Graphs.dst(se::AbstractSuperEdge) = not_implemented() | ||
| Base.reverse(se::AbstractSuperEdge) = not_implemented() | ||
|
|
||
| #Don't have the vertices wrapped. But wrap them with source and edge. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| abstract type AbstractSuperVertex{V} <: Any where {V} end | ||
|
|
||
| #Parent, wrap, unwrap, vertex? | ||
| Base.parent(sv::AbstractSuperVertex) = not_implemented() |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a slight nitpick, but could you rename this to
quotientgraph? My reasoning is that generally this will construct aQuotientGraph, so we can think of it as the lowercase function version ofQuotientGraph.In fact to simplify things right now maybe we could just use
QuotientGraphdirectly and get rid of the function version... I think we introduced that function sincePartitionsGraphViewwas a long name to write out, butQuotientGraphis easy to write. @jack-dunham @JoeyT1994 curious to hear your thoughts on that (best to decide now while we are making a breaking change...).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the function is unnecessary especially as
QuotientGraphis intended a wrapper type. I also think using the constructor directly is clearer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's go with that, we can always add a function back if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add a (very simple) inner constructor to avoid recursion, so now
QuotientGraphmust wrap anAbstractPartitionedGraph. Passing anAbstractGraphthat does not subtypeAbstractPartitionedGraphstill passes the trivial partition of this graph toQuotientGraph, as before.All tests pass on my end.