Below is a table of Grape commands with the Digraphs counterparts. The sections in this chapter correspond to the chapters in the Grape manual.
Grape command | Digraphs command | Comments |
Graph |
Digraph (3.1-5) |
Used with the arguments of Graph in Grape, Digraph (3.1-5) will return an equivalent digraph. |
EdgeOrbitsGraph |
EdgeOrbitsDigraph (3.1-8) |
The operation EdgeOrbitsDigraph (3.1-8) behaves the same as EdgeOrbitsDigraph in Grape. |
NullGraph |
NullDigraph (3.5-6) or EmptyDigraph (3.5-6) |
Note that, unlike in Grape, the arguments of NullDigraph (3.5-6) and EmptyDigraph (3.5-6) are just non-negative integers. Since digraphs in Digraphs are immutable, there is no reason (although it is possible) to create a null digraph and then add edges, as you might be used to doing in Grape. |
CompleteGraph |
CompleteDigraph (3.5-2) |
Note that, unlike in Grape, the argument to CompleteDigraph (3.5-2) is simply a non-negative integer indicating the number of vertices. By default a complete digraph in Digraphs does not have any loops. If you want a complete digraph with loops at every vertex, then use DigraphAddAllLoops (3.3-32). |
JohnsonGraph |
JohnsonDigraph (3.5-7) |
The Grape function JohnsonGraph is equivalent to JohnsonDigraph (3.5-7). |
CayleyGraph |
CayleyDigraph (3.1-10) |
The operation CayleyDigraph (3.1-10) behaves the same as CayleyGraph in Grape. |
AddEdgeOrbit |
DigraphAddEdgeOrbit (3.3-15) |
Note that, unlike in Grape, digraphs in Digraphs are immutable, and this operation returns a new digraph, i.e. it does not modify the digraph given as an argument. |
RemoveEdgeOrbit |
DigraphRemoveEdgeOrbit (3.3-20) |
Note that, unlike in Grape, digraphs in Digraphs are immutable, and this operation returns a new digraph, i.e. it does not modify the digraph given as an argument. |
AssignVertexNames |
SetDigraphVertexLabels (5.1-9) and SetDigraphVertexLabel (5.1-8) |
Use SetDigraphVertexLabel (5.1-8) to set an individual vertex label and SetDigraphVertexLabels (5.1-9) to set all of the vertex labels. |
Grape command | Digraphs command | Comments |
IsGraph |
IsDigraph (3.1-1) |
IsDigraph (3.1-1) is a category and not a function like IsGraph . |
OrderGraph |
DigraphNrVertices (5.1-2) |
The operation DigraphNrVertices (5.1-2) behaves the same as OrderGraph in Grape. |
IsVertex(graph, v) |
v in DigraphVertices(digraph) |
The attribute DigraphVertices (5.1-1) can be used to return the list of vertices of a digraph, or if v is known to be a positive integer, then you can simply do v <= DigraphNrVertices(digraph) |
VertexName |
DigraphVertexLabel (5.1-8) |
Unlike VertexName in Grape, the return value of DigraphVertexLabel (5.1-8) is mutable. |
VertexNames |
DigraphVertexLabels (5.1-9) |
Unlike VertexNames in Grape, the return value of DigraphVertexLabels (5.1-9) is mutable. |
Vertices |
DigraphVertices (5.1-1) |
The vertices of a digraph in Digraphs is always the range [1 .. n] where n is the number of vertices of the digraph. The operation DigraphVertices (5.1-1) behaves the same as Vertices in Grape. |
VertexDegree |
OutDegreeOfVertex (5.2-9) (see also: InDegreeOfVertex (5.2-11)) |
The operation OutDegreeOfVertex (5.2-9) behaves the same as VertexDegree in Grape. |
VertexDegrees |
OutDegreeSet (5.2-7) (see also: OutDegreeSequence (5.2-7), OutDegrees (5.2-7), InDegrees (5.2-8), InDegreeSequence (5.2-8), InDegreeSet (5.2-8)) |
The operation OutDegreeSet (5.2-7) behaves the same as VertexDegrees in Grape. |
IsLoopy |
DigraphHasLoops (6.1-1) |
The operation DigraphHasLoops (6.1-1) behaves the same as IsLoopy in Grape. |
IsSimpleGraph |
IsSymmetricDigraph (6.1-10) and not DigraphHasLoops (6.1-1) |
The Grape function IsSimpleGraph is equivalent to IsSymmetricDigraph (6.1-10) and not DigraphHasLoops (6.1-1). |
Adjacency |
OutNeighboursOfVertex (5.2-10) (see also InNeighboursOfVertex (5.2-12)) |
The operation OutNeighboursOfVertex (5.2-10) behaves the same as Adjacency in Grape. |
IsEdge |
IsDigraphEdge (5.1-14) |
The arguments of IsDigraphEdge (5.1-14) can be a digraph and an edge, or a digraph and two vertices. In the first form the operation IsDigraphEdge (5.1-14) behaves the same as IsEdge in Grape. |
DirectedEdges |
DigraphEdges (5.1-3) |
The attribute DigraphEdges (5.1-3) behaves the same as DirectedEdges in Grape. |
UndirectedEdges |
None | There is no analogous function in Digraphs, and no plans to include one. |
Distance |
DigraphShortestDistance (5.3-2) |
The operation DigraphShortestDistance (5.3-2) behaves the same as Distance in Grape. |
Diameter |
DigraphDiameter (5.3-1) |
The attribute DigraphDiameter (5.3-1) behaves the same as Diameter in Grape. |
Girth |
DigraphUndirectedGirth (5.3-7) |
The attribute DigraphUndirectedGirth (5.3-7) behaves the same as Girth in Grape except that in the case that the argument is a forest, infinity is returned by Digraphs whereas -1 is returned by Grape. |
IsConnectedGraph |
IsStronglyConnectedDigraph (6.3-5) |
The attribute IsStronglyConnectedDigraph (6.3-5) behaves the same as IsConnectedGraph in Grape. |
IsBipartite |
IsBipartiteDigraph (6.1-3) and IsSymmetricDigraph (6.1-10) |
The Grape function IsBipartite is equivalent to IsBipartiteDigraph (6.1-3) and IsSymmetricDigraph (6.1-10). |
IsNullGraph |
IsNullDigraph (6.1-6) or IsEmptyDigraph (6.1-6) |
The Grape function IsNullGraph is equivalent to IsEmptyDigraph (6.1-6) and its synonym IsNullDigraph (6.1-6). |
IsCompleteGraph |
IsCompleteDigraph (6.1-5) |
The Grape function IsCompleteGraph is roughly equivalent to IsCompleteDigraph (6.1-5) except that in Digraphs a complete digraph has no loops. |
Grape command | Digraphs command | Comments |
IsRegularGraph |
IsOutRegularDigraph (6.2-2) (see also IsInRegularDigraph (6.2-1) and IsRegularDigraph (6.2-3)) |
The Grape function IsRegularGraph is equivalent to IsOutRegularDigraph (6.2-2). |
LocalParameters |
None | The Grape function LocalParameters has no equivalent function in Digraphs, although this might change in the future. |
GlobalParameters |
None | The Grape function GlobalParameters has no equivalent function in Digraphs, although this might change in the future. |
IsDistanceRegular |
IsDistanceRegularDigraph (6.2-4) |
The Grape function IsDistanceRegular is equivalent to IsDistanceRegularDigraph (6.2-4). |
CollapsedAdjacencyMat |
None | The Grape function CollapsedAdjacencyMat has no equivalent function in Digraphs, although this might change in the future. |
OrbitalGraphColadjMats |
None | The Grape function OrbitalGraphColadjMats has no equivalent function in Digraphs, although this might change in the future. |
VertexTransitiveDRGs |
None | The Grape function VertexTransitiveDRGs has no equivalent function in Digraphs, although this might change in the future. |
Grape command | Digraphs command | Comments |
ConnectedComponent |
DigraphConnectedComponent (5.3-9) |
When applied to a simple di/graph and a vertex, ConnectedComponent in Grape is equivalent to DigraphConnectedComponent (5.3-9). DigraphConnectedComponent (5.3-9) can also be applied to non-simple graphs (in the language of Grape). |
ConnectedComponents |
DigraphConnectedComponents (5.3-8) |
When applied to a simple di/graph, ConnectedComponents in Grape is equivalent to DigraphConnectedComponents (5.3-8). DigraphConnectedComponents (5.3-8) can also be applied to non-simple graphs (in the language of Grape). |
Bicomponents |
DigraphBicomponents (5.3-12) |
When applied to a simple bipartite di/graph, Bicomponents in Grape is equivalent to DigraphBicomponents (5.3-12). The definition of IsBipartiteDigraph (6.1-3) does not require its argument to be simple (in the language of Grape), i.e. the bipartite graphs in Grape are a proper subset of the bipartite digraphs in Digraphs. |
DistanceSet |
DigraphDistanceSet (5.3-5) |
DistanceSet in Grape is equivalent to DigraphDistanceSet (5.3-5) in Digraphs. |
Layers |
DigraphLayers (5.3-21) |
Layers in Grape is equivalent to DigraphLayers (5.3-21) in Digraphs. |
IndependentSet |
DigraphIndependentSet (8.2-2) |
IndependentSet in Grape is equivalent to DigraphIndependentSet (8.2-2) in Digraphs. |
Grape command | Digraphs command | Comments |
InducedSubgraph |
InducedSubdigraph (3.3-2) |
InducedSubdigraph (3.3-2) in Digraphs does not allow a third argument G specifying a group of automorphisms on the resultant graph. This may be included in a future release. |
DistanceSetInduced |
None | There is no analogous function in Digraphs, and no plans to include one. |
DistanceGraph |
DistanceDigraph (3.3-33) |
DistanceGraph in Grape is equivalent to DistanceDigraph (3.3-33) in Digraphs. |
ComplementGraph |
DigraphDual (3.3-8) |
DigraphDual (3.3-8) in Digraphs is equivalent to ComplementGraph in Grape with the optional argument comploops set to true (loops/nonloops are complemented). |
PointGraph |
None | There is no analogous function in Digraphs, and no plans to include one. |
EdgeGraph |
EdgeUndirectedDigraph (3.3-29) |
EdgeGraph in Grape is equivalent to EdgeUndirectedDigraph (3.3-29) in Digraphs. |
SwitchedGraph |
None | There is no analogous function in Digraphs, and no plans to include one. |
UnderlyingGraph |
DigraphSymmetricClosure (3.3-9) |
UnderlyingGraph in Grape is equivalent to DigraphSymmetricClosure (3.3-9) in Digraphs. |
QuotientGraph |
QuotientDigraph (3.3-6) |
QuotientDigraph (3.3-6) in Digraphs takes a partition p of the vertices of the digraph, rather than a set of generating pairs. Hence, the equivalence might not be group-invariant. Also note that in Digraphs multiple edges may be created, whereas in Grape they are effectively combined into a single edge. |
BipartiteDouble |
BipartiteDoubleDigraph (3.3-31) |
BipartiteDouble in Grape is equivalent to BipartiteDoubleDigraph (3.3-31) in Digraphs. |
GeodesicsGraph |
None | There is no analogous function in Digraphs, and no plans to include one. |
CollapsedIndependentOrbitsGraph |
None | There is no analogous function in Digraphs, although this feature might be implemented in the future. |
CollapsedCompleteOrbitsGraph |
None | There is no analogous function in Digraphs, although this feature might be implemented in the future. |
NewGroupGraph |
None | There is no analogous function in Digraphs. However, the same results would be possible by calling DigraphCopy (3.3-1) on the digraph to produce a copy gr , and then applying SetDigraphGroup(gr, G) . |
Grape command | Digraphs command | Comments |
VertexColouring |
DigraphColouring (7.3-9) |
VertexColouring in Grape is equivalent to DigraphColouring (7.3-9) in Digraphs, except it return a transformation rather than a list of vertex colors. |
CompleteSubgraphs |
DigraphCliques (8.1-4) |
The functionality of CompleteSubgraphs in Grape is provided by DigraphCliques (8.1-4) and DigraphMaximalCliques (8.1-4) in Digraphs. |
CompleteSubgraphsOfGivenSize |
DigraphCliques (8.1-4) |
Much of the functionality of CompleteSubgraphsOfGivenSize in Grape is provided by DigraphCliques (8.1-4) and DigraphMaximalCliques (8.1-4) in Digraphs, except that the functionality relating to vertex weights and partial colourings is not implemented. |
Grape command | Digraphs command | Comments |
AutGroupGraph |
AutomorphismGroup (7.2-2) |
AutGroupGraph in Grape is equivalent to AutomorphismGroup (7.2-2) in Digraphs. |
GraphIsomorphism |
IsomorphismDigraphs (7.2-16) |
GraphIsomorphism in Grape is equivalent to IsomorphismDigraphs (7.2-16) in Digraphs. Note however that GraphIsomorphism 's optional argument firstunbindcanon is not applicable, since the canonical labellings of a digraph are not portable between sessions. |
IsIsomorphicGraph |
IsIsomorphicDigraph (7.2-14) |
IsIsomorphicGraph in Grape is equivalent to IsIsomorphicDigraph (7.2-14) in Digraphs. Note however that IsIsomorphicGraph 's optional argument firstunbindcanon is not applicable, since the canonical labellings of a digraph are not portable between sessions. |
GraphIsomorphismClassRepresentatives |
None | There is no analogous function in Digraphs, although this feature might be implemented in the future. |
generated by GAPDoc2HTML