next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Nauty :: stringToGraph

stringToGraph -- converts a Sparse6 or Graph6 String to a Graph in the given polynomial ring

Synopsis

Description

This method converts a Sparse6 or Graph6 string $S$ to an instance of the class Graph, stored in $G$, with the given polynomial ring $R$.

Note, this method requires that the number of variables of $R$ be the same as the number of vertices of $S$.

i1 : R = QQ[a..e];
i2 : stringToGraph("Dhc", R)

o2 = Graph{edges => {{a, b}, {b, c}, {c, d}, {a, e}, {d, e}}}
           ring => R
           vertices => {a, b, c, d, e}

o2 : Graph

See also

Ways to use stringToGraph :

For the programmer

The object stringToGraph is a method function.