 ConvertGraph - Maple Help

GraphTheory

 ConvertGraph
 convert graph to/from various formats Calling Sequence ConvertGraph(G, fmt) ConvertGraph(G) Parameters

 G - representation of a graph in one of the allowed formats fmt - name of a format Description

 • ConvertGraph converts its input graph G to the format fmt. If G is of type GRAPHLN, the second argument is mandatory and must be one of digraph6, graph6, sparse6, or bits. If G is not of type GRAPHLN, the second argument is optional, and can be either of the above formats as well as maple.
 • The input graph G can be a GraphTheory graph (GRAPHLN), a networks graph, a string whose value is a digraph6, graph6, or sparse6 representation of a graph, or a bits representation of a graph (list of two integers). Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $\mathrm{with}\left(\mathrm{SpecialGraphs}\right):$
 > $\mathrm{d6}≔\mathrm{ConvertGraph}\left(\mathrm{PetersenGraph}\left(\right),'\mathrm{digraph6}'\right)$
 ${\mathrm{d6}}{≔}{"&IRA_dGIEPGHHOIcDDG"}$ (1)
 > $\mathrm{g6}≔\mathrm{ConvertGraph}\left(\mathrm{PetersenGraph}\left(\right),'\mathrm{graph6}'\right)$
 ${\mathrm{g6}}{≔}{"Ihe@GT@DG"}$ (2)
 > $\mathrm{s6}≔\mathrm{ConvertGraph}\left(\mathrm{PetersenGraph}\left(\right),'\mathrm{sparse6}'\right)$
 ${\mathrm{s6}}{≔}{":IES@ocUgfeTF"}$ (3)
 > $b≔\mathrm{ConvertGraph}\left(\mathrm{PetersenGraph}\left(\right),'\mathrm{bits}'\right)$
 ${b}{≔}\left[{10}{,}{22854075843097}\right]$ (4)
 > $\mathrm{ConvertGraph}\left(\mathrm{g6},'\mathrm{sparse6}'\right)$
 ${":IES@ocUgfeTF"}$ (5)
 > $\mathrm{ConvertGraph}\left(\mathrm{s6}\right)$
 ${\mathrm{Graph 1: an undirected unweighted graph with 10 vertices and 15 edge\left(s\right)}}$ (6) Compatibility

 • The GraphTheory[ConvertGraph] command was updated in Maple 2017.