Skip to content

Commit 7e9d534

Browse files
Replace Dot -> Graphviz
1 parent dc60352 commit 7e9d534

File tree

11 files changed

+1288
-1231
lines changed

11 files changed

+1288
-1231
lines changed

PackageInfo.g

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
## <!ENTITY ORBVERS "4.8.2">
1717
## <!ENTITY DATASTRUCTURESVERS "0.2.5">
1818
## <!ENTITY NAUTYTRACESINTERFACEVERS "0.2">
19+
## <!ENTITY GRAPHVIZVERS "0.0.0">
1920
## <!ENTITY ARCHIVENAME "digraphs-1.7.1">
2021
## <!ENTITY COPYRIGHTYEARS "2014-24">
2122
## <#/GAPDoc>
@@ -390,7 +391,7 @@ Dependencies := rec(
390391
GAP := ">=4.10.0",
391392
NeededOtherPackages := [["io", ">=4.5.1"],
392393
["orb", ">=4.8.2"],
393-
["graphviz", "*"],
394+
["graphviz", ">=0.0.0"],
394395
["datastructures", ">=0.2.5"]],
395396
SuggestedOtherPackages := [["GAPDoc", ">=1.6.3"],
396397
["grape", ">=4.8.1"],

doc/display.xml

Lines changed: 332 additions & 514 deletions
Large diffs are not rendered by default.

doc/main.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
<!ENTITY Grape "<Alt Not='Text'><URL
44
Text='Grape'>https://gap-packages.github.io/grape</URL></Alt><Alt
55
Only='Text'><Package>Grape</Package></Alt>">
6+
<!ENTITY graphviz "<Alt Not='Text'><URL
7+
Text='Graphviz'>https://digraphs.github.io/graphviz</URL></Alt><Alt
8+
Only='Text'><Package>Graphviz</Package></Alt>">
69
<!ENTITY bliss "<Alt Not='Text'><URL
710
Text='bliss'>http://www.tcs.tkk.fi/Software/bliss/</URL></Alt><Alt
811
Only='Text'><Package>bliss</Package></Alt>">
9-
<!ENTITY edge-addition-planarity-suite "<Alt Not='Text'><URL
12+
<!ENTITY edge-addition-planarity-suite "<Alt Not='Text'><URL
1013
Text='edge-addition-planarity-suite'>https://github.com/graph-algorithms/edge-addition-planarity-suite</URL></Alt><Alt
1114
Only='Text'><Package>edge-addition-planarity-suite</Package></Alt>">
1215
<!ENTITY nauty "<Alt Not='Text'><URL

doc/z-chap9.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
<Chapter Label="Visualising and IO"><Heading>Visualising and IO</Heading>
22

33
<Section><Heading>Visualising a digraph</Heading>
4-
<#Include Label="Splash">
4+
<#Include Label="GraphvizDigraph">
55
<#Include Label="DotDigraph">
6-
<#Include Label="DotSymmetricDigraph">
6+
7+
<#Include Label="GraphvizColoredDigraph">
8+
<#Include Label="DotColoredDigraph">
9+
10+
<#Include Label="GraphvizVertexLabelledDigraph">
11+
<#Include Label="DotVertexLabelledDigraph">
12+
13+
<#Include Label="GraphvizPartialOrderDigraph">
714
<#Include Label="DotPartialOrderDigraph">
15+
16+
<#Include Label="GraphvizPreorderDigraph">
817
<#Include Label="DotPreorderDigraph">
18+
19+
<#Include Label="GraphvizHighlightedDigraph">
920
<#Include Label="DotHighlightedDigraph">
1021
</Section>
1122

gap/deprecated.gd

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#############################################################################
2+
##
3+
## deprecated.gd
4+
## Copyright (C) 2024 James D. Mitchell
5+
##
6+
## Licensing information can be found in the README file of this package.
7+
##
8+
#############################################################################
9+
##
10+
11+
DeclareAttribute("DotDigraph", IsDigraph);
12+
DeclareAttribute("DotSymmetricDigraph", IsDigraph);
13+
14+
DeclareOperation("DotSymmetricVertexColoredDigraph", [IsDigraph, IsList]);
15+
DeclareOperation("DotVertexColoredDigraph", [IsDigraph, IsList]);
16+
17+
DeclareOperation("DotEdgeColoredDigraph", [IsDigraph, IsList]);
18+
DeclareOperation("DotSymmetricEdgeColoredDigraph", [IsDigraph, IsList]);
19+
20+
DeclareOperation("DotColoredDigraph", [IsDigraph, IsList, IsList]);
21+
DeclareOperation("DotSymmetricColoredDigraph", [IsDigraph, IsList, IsList]);
22+
23+
DeclareOperation("DotVertexLabelledDigraph", [IsDigraph]);
24+
25+
DeclareAttribute("DotPartialOrderDigraph", IsDigraph);
26+
DeclareAttribute("DotPreorderDigraph", IsDigraph);
27+
28+
DeclareSynonym("DotQuasiorderDigraph", DotPreorderDigraph);
29+
30+
DeclareOperation("DotHighlightedDigraph", [IsDigraph, IsList]);
31+
DeclareOperation("DotHighlightedDigraph",
32+
[IsDigraph, IsList, IsString, IsString]);
33+
DeclareOperation("DotHighlightedGraph", [IsDigraph, IsList]);
34+
DeclareOperation("DotHighlightedGraph",
35+
[IsDigraph, IsList, IsString, IsString]);

gap/deprecated.gi

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
#############################################################################
2+
##
3+
## deprecated.gi
4+
## Copyright (C) 2024 James D. Mitchell
5+
##
6+
## Licensing information can be found in the README file of this package.
7+
##
8+
#############################################################################
9+
##
10+
11+
BindGlobal("_PrintDeprecated", function(old, arg...)
12+
Info(InfoWarning, 1, "`", old, "` is deprecated and will be removed in v3",
13+
" use `", Concatenation(List(arg, String)), "` instead!");
14+
end);
15+
16+
InstallMethod(DotDigraph, "for a digraph", [IsDigraph],
17+
function(D)
18+
_PrintDeprecated("DotDigraph", "GraphvizDigraph");
19+
return AsString(GraphvizDigraph(D));
20+
end);
21+
22+
InstallMethod(DotSymmetricDigraph, "for a digraph", [IsDigraph],
23+
function(D)
24+
_PrintDeprecated("DotSymmetricDigraph", "GraphvizGraph");
25+
return AsString(GraphvizGraph(D));
26+
end);
27+
28+
InstallMethod(DotSymmetricVertexColoredDigraph,
29+
"for a digraph and list of colors",
30+
[IsDigraph, IsHomogeneousList],
31+
function(D, colors)
32+
_PrintDeprecated("DotSymmetricVertexColoredDigraph",
33+
"GraphvizVertexColoredGraph");
34+
return AsString(GraphvizVertexColoredGraph(D, colors));
35+
end);
36+
37+
InstallMethod(DotVertexColoredDigraph, "for a digraph and a list",
38+
[IsDigraph, IsList],
39+
function(D, colors)
40+
_PrintDeprecated("DotVertexColoredDigraph",
41+
"GraphvizVertexColoredDigraph");
42+
return AsString(GraphvizVertexColoredDigraph(D, colors));
43+
end);
44+
45+
InstallMethod(DotSymmetricEdgeColoredDigraph,
46+
"for a digraph and list of colors",
47+
[IsDigraph, IsHomogeneousList],
48+
function(D, colors)
49+
_PrintDeprecated("DotSymmetricEdgeColoredDigraph",
50+
"GraphvizEdgeColoredGraph");
51+
return AsString(GraphvizEdgeColoredGraph(D, colors));
52+
end);
53+
54+
InstallMethod(DotEdgeColoredDigraph, "for a digraph and a list",
55+
[IsDigraph, IsList],
56+
function(D, colors)
57+
_PrintDeprecated("DotEdgeColoredDigraph",
58+
"GraphvizEdgeColoredDigraph");
59+
return AsString(GraphvizEdgeColoredDigraph(D, colors));
60+
end);
61+
62+
InstallMethod(DotSymmetricColoredDigraph,
63+
"for a digraph, vertex colors, and edge colors",
64+
[IsDigraph, IsHomogeneousList, IsHomogeneousList],
65+
function(D, n_colors, e_colors)
66+
_PrintDeprecated("DotSymmetricColoredDigraph",
67+
"GraphvizColoredGraph");
68+
return AsString(GraphvizColoredGraph(D, n_colors, e_colors));
69+
end);
70+
71+
InstallMethod(DotColoredDigraph,
72+
"for a digraph, vertex colors, and edge colors",
73+
[IsDigraph, IsHomogeneousList, IsHomogeneousList],
74+
function(D, n_colors, e_colors)
75+
_PrintDeprecated("DotColoredDigraph",
76+
"GraphvizColoredDigraph");
77+
return AsString(GraphvizColoredDigraph(D, n_colors, e_colors));
78+
end);
79+
80+
InstallMethod(DotVertexLabelledDigraph, "for a digraph", [IsDigraph],
81+
function(D)
82+
_PrintDeprecated("DotVertexLabelledDigraph",
83+
"GraphvizVertexLabelledDigraph");
84+
return AsString(GraphvizVertexLabelledDigraph(D));
85+
end);
86+
87+
InstallMethod(DotPartialOrderDigraph, "for a digraph", [IsDigraph],
88+
function(D)
89+
_PrintDeprecated("DotPartialOrderDigraph",
90+
"GraphvizPartialOrderDigraph");
91+
return AsString(GraphvizPartialOrderDigraph(D));
92+
end);
93+
94+
InstallMethod(DotPreorderDigraph, "for a digraph", [IsDigraph],
95+
function(D)
96+
_PrintDeprecated("DotPreorderDigraph",
97+
"GraphvizPreorderDigraph");
98+
return AsString(GraphvizPreorderDigraph(D));
99+
end);
100+
101+
InstallMethod(DotHighlightedDigraph,
102+
"for a digraph, list, and two strings",
103+
[IsDigraph, IsList, IsString, IsString],
104+
function(D, hi_verts, hi, lo)
105+
_PrintDeprecated("DotHighlightedDigraph",
106+
"GraphvizHighlightedDigraph");
107+
return AsString(GraphvizHighlightedDigraph(D, hi_verts, hi, lo));
108+
end);
109+
110+
InstallMethod(DotHighlightedDigraph, "for a digraph and list",
111+
[IsDigraph, IsList],
112+
function(D, list)
113+
_PrintDeprecated("DotHighlightedDigraph",
114+
"GraphvizHighlightedDigraph");
115+
return AsString(GraphvizHighlightedDigraph(D, list, "black", "grey"));
116+
end);

gap/display.gd

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,57 @@
88
#############################################################################
99
##
1010

11-
DeclareAttribute("GraphvizDotDigraph", IsDigraph);
12-
DeclareOperation("GraphvizDotColoredDigraph", [IsDigraph, IsList, IsList]);
13-
DeclareOperation("GraphvizDotVertexColoredDigraph", [IsDigraph, IsList]);
14-
DeclareOperation("GraphvizDotEdgeColoredDigraph", [IsDigraph, IsList]);
15-
DeclareOperation("GraphvizDotVertexLabelledDigraph", [IsDigraph]);
16-
DeclareAttribute("GraphvizDotSymmetricDigraph", IsDigraph);
17-
DeclareOperation("GraphvizDotSymmetricColoredDigraph",
18-
[IsDigraph, IsList, IsList]);
19-
DeclareOperation("GraphvizDotSymmetricVertexColoredDigraph",
20-
[IsDigraph, IsList]);
21-
DeclareOperation("GraphvizDotSymmetricEdgeColoredDigraph", [IsDigraph, IsList]);
22-
DeclareAttribute("GraphvizDotPartialOrderDigraph", IsDigraph);
23-
DeclareAttribute("GraphvizDotPreorderDigraph", IsDigraph);
24-
DeclareSynonym("GraphvizDotQuasiorderDigraph", GraphvizDotPreorderDigraph);
25-
DeclareOperation("GraphvizDotHighlightedDigraph", [IsDigraph, IsList]);
26-
DeclareOperation("GraphvizDotHighlightedDigraph",
27-
[IsDigraph, IsList, IsString, IsString]);
11+
#############################################################################
12+
# Graphs and digraphs
13+
#############################################################################
2814

29-
DeclareAttribute("DotDigraph", IsDigraph);
30-
DeclareOperation("DotColoredDigraph", [IsDigraph, IsList, IsList]);
31-
DeclareOperation("DotVertexColoredDigraph", [IsDigraph, IsList]);
32-
DeclareOperation("DotEdgeColoredDigraph", [IsDigraph, IsList]);
33-
DeclareOperation("DotVertexLabelledDigraph", [IsDigraph]);
34-
DeclareAttribute("DotSymmetricDigraph", IsDigraph);
35-
DeclareOperation("DotSymmetricColoredDigraph", [IsDigraph, IsList, IsList]);
36-
DeclareOperation("DotSymmetricVertexColoredDigraph", [IsDigraph, IsList]);
37-
DeclareOperation("DotSymmetricEdgeColoredDigraph", [IsDigraph, IsList]);
38-
DeclareAttribute("DotPartialOrderDigraph", IsDigraph);
39-
DeclareAttribute("DotPreorderDigraph", IsDigraph);
40-
DeclareSynonym("DotQuasiorderDigraph", DotPreorderDigraph);
41-
DeclareOperation("DotHighlightedDigraph", [IsDigraph, IsList]);
42-
DeclareOperation("DotHighlightedDigraph",
43-
[IsDigraph, IsList, IsString, IsString]);
15+
DeclareOperation("GraphvizDigraph", [IsDigraph]);
16+
DeclareOperation("GraphvizGraph", [IsDigraph]);
17+
18+
#############################################################################
19+
# Vertex coloured graphs and digraphs
20+
#############################################################################
21+
22+
DeclareOperation("GraphvizVertexColoredDigraph", [IsDigraph, IsList]);
23+
DeclareOperation("GraphvizVertexColoredGraph", [IsDigraph, IsList]);
24+
25+
#############################################################################
26+
# Edge coloured graphs and digraphs
27+
#############################################################################
28+
29+
DeclareOperation("GraphvizEdgeColoredDigraph", [IsDigraph, IsList]);
30+
DeclareOperation("GraphvizEdgeColoredGraph", [IsDigraph, IsList]);
31+
32+
#############################################################################
33+
# Vertex and edge coloured graphs and digraphs
34+
#############################################################################
4435

36+
DeclareOperation("GraphvizColoredDigraph", [IsDigraph, IsList, IsList]);
37+
DeclareOperation("GraphvizColoredGraph", [IsDigraph, IsList, IsList]);
38+
39+
#############################################################################
40+
# Vertex labelled graphs and digraphs
41+
#############################################################################
42+
43+
DeclareOperation("GraphvizVertexLabelledDigraph", [IsDigraph]);
44+
DeclareOperation("GraphvizVertexLabelledGraph", [IsDigraph]);
45+
46+
#############################################################################
47+
# Partial and preorder digraphs
48+
#############################################################################
49+
50+
DeclareAttribute("GraphvizPartialOrderDigraph", IsDigraph);
51+
DeclareAttribute("GraphvizPreorderDigraph", IsDigraph);
52+
53+
DeclareSynonym("GraphvizQuasiorderDigraph", GraphvizPreorderDigraph);
54+
55+
#############################################################################
56+
# Highlighted subdigraphs
57+
#############################################################################
58+
59+
DeclareOperation("GraphvizHighlightedDigraph", [IsDigraph, IsList]);
60+
DeclareOperation("GraphvizHighlightedDigraph",
61+
[IsDigraph, IsList, IsString, IsString]);
62+
DeclareOperation("GraphvizHighlightedGraph", [IsDigraph, IsList]);
63+
DeclareOperation("GraphvizHighlightedGraph",
64+
[IsDigraph, IsList, IsString, IsString]);

0 commit comments

Comments
 (0)