[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backe
From: |
Ludovic Courtès |
Subject: |
[bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend. |
Date: |
Mon, 05 Mar 2018 18:17:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi Hartmut,
Hartmut Goebel <address@hidden> skribis:
> * guix/graph.scm ((emit-edge, emit-d3js-edge, emit-cypher-edge): New arguments
> label1 , label2.
> (emit-tg-progloug, mit-tgf-epilouge, emit-tgf-node, emit-tgf-edge): New
> variables.
> (%trivial-graph-backend): New variable.
> (%graph-backends): Add %trivial-graph-backend.
> (export-graph): Pass labels to emit-edge.
Can you tell us more about the Trivial Graph Format?
> -(define (emit-edge id1 id2 port)
> +(define (emit-edge id1 label1 id2 label2 port)
> (format port " \"~a\" -> \"~a\" [color = ~a];~%"
> id1 id2 (pop-color id1)))
This is orthogonal to adding a new format, so it should probably be a
separate patch.
> +(define (emit-tgf-edge id1 label1 id2 label2 port)
> + (format port "~a ~a~%" label1 label2))
This is probably incorrect because labels do not necessarily uniquely
identify nodes. This is why the API distinguishes node identifiers and
labels.
Thanks,
Ludo’.
- [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend., Hartmut Goebel, 2018/03/05
- [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend.,
Ludovic Courtès <=
- [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend., Hartmut Goebel, 2018/03/05
- [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend., Ludovic Courtès, 2018/03/06
- bug#30711: [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend., Hartmut Goebel, 2018/03/06
- [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend., Björn Höfling, 2018/03/06
- [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend., Hartmut Goebel, 2018/03/06
- [bug#30711] [PATCH 1/1] guix: graph: Add Trival Graph Format (TGF) backend., Ludovic Courtès, 2018/03/12