yamada#

Compute the Yamada polynomial of a knotted planar diagram described in [Yamada, S. (1989). An invariant of spatial graphs. Journal of Graph Theory, 13(5), 537-551].

Optimizations: * precomputed powers of sigma = A + 1 + 1/A, * simplification of the knotted graphs mid-computation (reducing crossings via R1 unkinks and R2 unpokes,…) * caching of the Yamada polynomials for planar graphs, * caching of the Yamada polynomials for knotted graphs.

yamada(k, normalize=True)#

Return the Yamada polynomial of a given planar diagram.

Parameters:
  • k (PlanarDiagram) – Planar diagram (knotted spatial graph allowed).

  • normalize (bool) – If True, multiply by a power of (-A) so the lowest term is constant.

Returns:

SymPy expression for the Yamada polynomial.

Return type:

Expr