This method converts a Sparse6 or Graph6 string $S$ to an edge ideal $I$ in the given polynomial ring $R$. That is, for each edge $(a,b)$ in the graph given by $S$, the monomial $a*b$ is added as a generator to $I$.
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 : stringToEdgeIdeal("Dhc", R) o2 = monomialIdeal (a*b, b*c, c*d, a*e, d*e) o2 : MonomialIdeal of R |
This method is almost always faster than converting the string to a graph and then to an edge ideal using the edgeIdeal method.
The object stringToEdgeIdeal is a method function.