next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Nauty :: graphToString

graphToString -- converts a graph to a string in the Graph6 format

Synopsis

Description

This method converts various ways of representing a graph into nauty’s Graph6 String format. Note that if the Ideal (or MonomialIdeal) passed to the method is not squarefree and monomial, then the method may have unknown and possibly undesired results.

In this example, all graphs are the five cycle.
i1 : graphToString({{0,1}, {1,2}, {2,3}, {3,4}, {0,4}}, 5)

o1 = Dhc
i2 : R = QQ[a..e];
i3 : graphToString monomialIdeal (a*c, a*d, b*d, b*e, c*e)

o3 = DUW
i4 : graphToString cycle R

o4 = Dhc
i5 : graphToString "Dhc"

o5 = Dhc

Caveat

Notice that if using a List and number of vertices input to create the String, then the List must have vertices labeled 0 to n-1 and should be preferably in sorted order.

See also

Ways to use graphToString :