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.

Functions

yamada_polynomial(k[, normalize])

Return the value of the Yamada polynomial of a given planar diagram.