Skip to content
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

Canonical output when printing a graph #139

Open
etiennedeg opened this issue May 30, 2022 · 1 comment · May be fixed by #148
Open

Canonical output when printing a graph #139

etiennedeg opened this issue May 30, 2022 · 1 comment · May be fixed by #148
Assignees
Labels
enhancement New feature or request

Comments

@etiennedeg
Copy link
Member

etiennedeg commented May 30, 2022

discussion started here: #121

With #121, the new form of printing will be canonical.
I think the show function with plain/text should also be canonical.
Here are some propositions on what the output could look like:

julia> path_graph(5)
{5, 4} undirected simple Int64 graph
Edge 1 => 2, Edge 2 => 3, Edge 3 => 4, Edge 4 => 5
julia> path_graph(5)
{5, 4} undirected simple Int64 graph
Edge 1 => 2
Edge 2 => 3
Edge 3 => 4 
Edge 4 => 5
julia> path_graph(5)
{5, 4} 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 with eltype, number of vertices and number of edges (currently, it output the default "SimpleGraph{Int64}", which is less satisfactory.

@gdalle
Copy link
Member

gdalle commented Jun 19, 2022

I like the last one best, and it is closest to the actual adjacency list storage

@gdalle gdalle added the enhancement New feature or request label Jun 19, 2022
@etiennedeg etiennedeg self-assigned this Jun 22, 2022
@etiennedeg etiennedeg linked a pull request Jun 22, 2022 that will close this issue
@gdalle gdalle added this to the v1.9 milestone Jun 28, 2023
@gdalle gdalle removed this from the v1.9 milestone Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants