Digraph6 - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Digraph6 (.d6) Graph Format

Digraph6 file format

Description

 • Digraph6 is a text-based file format for storing one or more directed graphs.
 • The GraphTheory[ImportGraph] and GraphTheory[ExportGraph] commands can read from and write to this format.
 • The general-purpose commands Import and Export also support this format.

Examples

Import a digraph6 file encoding a simple directed graph with a cycle.

 > $G≔\mathrm{Import}\left("example/dgex.d6",\mathrm{base}=\mathrm{datadir}\right)$
 ${G}{≔}{\mathrm{Graph 1: a directed graph with 4 vertices and 4 arc\left(s\right)}}$ (1)
 > $\mathrm{GraphTheory}:-\mathrm{DrawGraph}\left(G,\mathrm{style}=\mathrm{spring}\right)$

Export a digraph to a Digraph6 file in the home directory of the current user.

 > $G≔\mathrm{GraphTheory}:-\mathrm{Graph}\left(5,\left\{\left[1,2\right],\left[2,3\right],\left[2,4\right],\left[3,5\right]\right\}\right)$
 ${G}{≔}{\mathrm{Graph 2: a directed graph with 5 vertices and 4 arc\left(s\right)}}$ (2)
 > $\mathrm{Export}\left("graph.d6",G,\mathrm{base}=\mathrm{homedir}\right)$
 ${8}$ (3)

References

 McKay, B.D. and Piperno, A., Practical Graph Isomorphism, II, Journal of Symbolic Computation, 60 (2014), pp. 94-112, doi:10.1016/j.jsc.2013.09.003

 See Also