JuliaGraphs / JuliaGraphs/Graphs.jl
Canonical output when printing a graph
Open
@etiennedeg is already working on this.
Since Jun 22, 2022.
enhancement
- Dominant language
- Julia
- Stars
- 538
- Forks
- 128
- Avg merge
- 10h 25m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.