Skip to content

Commit

Permalink
Replace Dot -> Graphviz
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed May 10, 2024
1 parent e67f88d commit 443ff11
Show file tree
Hide file tree
Showing 4 changed files with 833 additions and 697 deletions.
3 changes: 2 additions & 1 deletion PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
## <!ENTITY ORBVERS "4.8.2">
## <!ENTITY DATASTRUCTURESVERS "0.2.5">
## <!ENTITY NAUTYTRACESINTERFACEVERS "0.2">
## <!ENTITY GRAPHVIZVERS "0.0.0">
## <!ENTITY ARCHIVENAME "digraphs-1.7.1">
## <!ENTITY COPYRIGHTYEARS "2014-24">
## <#/GAPDoc>
Expand Down Expand Up @@ -390,7 +391,7 @@ Dependencies := rec(
GAP := ">=4.10.0",
NeededOtherPackages := [["io", ">=4.5.1"],
["orb", ">=4.8.2"],
["graphviz", "*"],
["graphviz", ">=0.0.0"],
["datastructures", ">=0.2.5"]],
SuggestedOtherPackages := [["GAPDoc", ">=1.6.3"],
["grape", ">=4.8.1"],
Expand Down
103 changes: 80 additions & 23 deletions gap/display.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,94 @@
#############################################################################
##

DeclareAttribute("GraphvizDotDigraph", IsDigraph);
DeclareOperation("GraphvizDotColoredDigraph", [IsDigraph, IsList, IsList]);
DeclareOperation("GraphvizDotVertexColoredDigraph", [IsDigraph, IsList]);
DeclareOperation("GraphvizDotEdgeColoredDigraph", [IsDigraph, IsList]);
DeclareOperation("GraphvizDotVertexLabelledDigraph", [IsDigraph]);
DeclareAttribute("GraphvizDotSymmetricDigraph", IsDigraph);
DeclareOperation("GraphvizDotSymmetricColoredDigraph",
[IsDigraph, IsList, IsList]);
DeclareOperation("GraphvizDotSymmetricVertexColoredDigraph",
[IsDigraph, IsList]);
DeclareOperation("GraphvizDotSymmetricEdgeColoredDigraph", [IsDigraph, IsList]);
DeclareAttribute("GraphvizDotPartialOrderDigraph", IsDigraph);
DeclareAttribute("GraphvizDotPreorderDigraph", IsDigraph);
DeclareSynonym("GraphvizDotQuasiorderDigraph", GraphvizDotPreorderDigraph);
DeclareOperation("GraphvizDotHighlightedDigraph", [IsDigraph, IsList]);
DeclareOperation("GraphvizDotHighlightedDigraph",
[IsDigraph, IsList, IsString, IsString]);
#############################################################################
# Graphs and digraphs
#############################################################################

DeclareOperation("GraphvizDigraph", [IsDigraph]);
DeclareOperation("GraphvizGraph", [IsDigraph]);
DeclareAttribute("DotDigraph", IsDigraph);
DeclareOperation("DotColoredDigraph", [IsDigraph, IsList, IsList]);
DeclareAttribute("DotGraph", IsDigraph);

# For backwards compatibility
DeclareSynonym("GraphvizSymmetricDigraph", GraphvizGraph);
DeclareSynonym("DotSymmetricDigraph", DotGraph);

#############################################################################
# Vertex coloured graphs and digraphs
#############################################################################

DeclareOperation("GraphvizVertexColoredDigraph", [IsDigraph, IsList]);
DeclareOperation("GraphvizVertexColoredGraph", [IsDigraph, IsList]);
DeclareOperation("DotVertexColoredDigraph", [IsDigraph, IsList]);
DeclareOperation("DotVertexColoredGraph", [IsDigraph, IsList]);

# For backwards compatibility
DeclareSynonym("GraphvizSymmetricVertexColoredDigraph",
GraphvizVertexColoredGraph);
DeclareSynonym("DotSymmetricVertexColoredDigraph",
DotVertexColoredGraph);

#############################################################################
# Edge coloured graphs and digraphs
#############################################################################

DeclareOperation("GraphvizEdgeColoredDigraph", [IsDigraph, IsList]);
DeclareOperation("GraphvizEdgeColoredGraph", [IsDigraph, IsList]);
DeclareOperation("DotEdgeColoredDigraph", [IsDigraph, IsList]);
DeclareOperation("DotEdgeColoredGraph", [IsDigraph, IsList]);

# For backwards compatibility
DeclareSynonym("GraphvizSymmetricEdgeColoredDigraph", GraphvizEdgeColoredGraph);
DeclareSynonym("DotSymmetricEdgeColoredDigraph", DotEdgeColoredGraph);

#############################################################################
# Vertex and edge coloured graphs and digraphs
#############################################################################

DeclareOperation("GraphvizColoredDigraph", [IsDigraph, IsList, IsList]);
DeclareOperation("GraphvizColoredGraph", [IsDigraph, IsList, IsList]);
DeclareOperation("DotColoredDigraph", [IsDigraph, IsList, IsList]);
DeclareOperation("DotColoredGraph", [IsDigraph, IsList, IsList]);

# For backwards compatibility
DeclareSynonym("GraphvizSymmetricColoredDigraph", GraphvizColoredGraph);
DeclareSynonym("DotSymmetricColoredDigraph", DotColoredGraph);

#############################################################################
# Vertex labelled graphs and digraphs
#############################################################################

DeclareOperation("GraphvizVertexLabelledDigraph", [IsDigraph]);
DeclareOperation("GraphvizVertexLabelledGraph", [IsDigraph]);
DeclareOperation("DotVertexLabelledDigraph", [IsDigraph]);
DeclareAttribute("DotSymmetricDigraph", IsDigraph);
DeclareOperation("DotSymmetricColoredDigraph", [IsDigraph, IsList, IsList]);
DeclareOperation("DotSymmetricVertexColoredDigraph", [IsDigraph, IsList]);
DeclareOperation("DotSymmetricEdgeColoredDigraph", [IsDigraph, IsList]);
DeclareOperation("DotVertexLabelledGraph", [IsDigraph]);

#############################################################################
# Partial and preorder digraphs
#############################################################################

DeclareAttribute("GraphvizPartialOrderDigraph", IsDigraph);
DeclareAttribute("GraphvizPreorderDigraph", IsDigraph);
DeclareAttribute("DotPartialOrderDigraph", IsDigraph);
DeclareAttribute("DotPreorderDigraph", IsDigraph);

DeclareSynonym("GraphvizQuasiorderDigraph", GraphvizPreorderDigraph);
DeclareSynonym("DotQuasiorderDigraph", DotPreorderDigraph);

#############################################################################
# Highlighted subdigraphs
#############################################################################

DeclareOperation("GraphvizHighlightedDigraph", [IsDigraph, IsList]);
DeclareOperation("GraphvizHighlightedDigraph",
[IsDigraph, IsList, IsString, IsString]);
DeclareOperation("GraphvizHighlightedGraph", [IsDigraph, IsList]);
DeclareOperation("GraphvizHighlightedGraph",
[IsDigraph, IsList, IsString, IsString]);
DeclareOperation("DotHighlightedDigraph", [IsDigraph, IsList]);
DeclareOperation("DotHighlightedDigraph",
[IsDigraph, IsList, IsString, IsString]);

DeclareOperation("DotHighlightedGraph", [IsDigraph, IsList]);
DeclareOperation("DotHighlightedGraph",
[IsDigraph, IsList, IsString, IsString]);
Loading

0 comments on commit 443ff11

Please sign in to comment.