-
Notifications
You must be signed in to change notification settings - Fork 92
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
make clipboard(g) work #121
make clipboard(g) work #121
Conversation
I agree that the current form of printing is annoying because not canonical. julia> path_graph(5)
{4, 3} undirected simple Int64 graph
Edge 1 => 2, Edge 2 => 3, Edge 3 => 4, Edge 4 => 5 or julia> path_graph(5)
{4, 3} undirected simple Int64 graph
Edge 1 => 2
Edge 2 => 3
Edge 3 => 4
Edge 4 => 5 or julia> path_graph(5)
{4, 3} undirected simple Int64 graph
1 => [2]
2 => [1, 3]
3 => [2, 4]
4 =>[3, 5]
5 => [4] We should implement summary to output the old behavior (currently, it output the default |
Codecov Report
@@ Coverage Diff @@
## master #121 +/- ##
=======================================
Coverage 97.54% 97.54%
=======================================
Files 109 109
Lines 6318 6318
=======================================
Hits 6163 6163
Misses 155 155 |
If I understand this pr correctly, it ensures that And the behavior in the repl is still the same, right? I think that one calls
What exactly do you mean by canonical? That it reports all the edges? That won't work for all but very small graphs, as it would just fill the repl. |
Yes, from my understanding, I think it means that two different objects should have distinct canonical expressions, so the print should display all the edges. Almost all Julia objects behave the same, for example, call Some objects don't have a strictly canonical display, for example, the "text/plain" display of a sparse matrix is the dotted representation, which is not canonical for big matrices, so I don't really know how much we need to enforce this rule. |
@etiennedeg Is it ok, if we take this discussion outside of this PR and merge this one? |
ok |
With this PR, if I have a graph in one REPL and I
clipboard(g)
, I can paste it in another and have the same graph in both places