utils#

In utils we store general functions that are not knot/graph specific.

Modules

cache

Provides an in-memory dictionary-style cache for intermediate storage in KnotPy.

circlepack

Implements a fast, dependency-free algorithm for packing circles with prescribed tangencies.

decorators

Provides a decorator to add total ordering to a class using a _compare method.

dict_utils

Utility functions and classes for manipulating dictionaries in KnotPy.

disjoint_union_set

Disjoint Set Union (Union–Find).

geometry

Library for (numerical) geometry.

laurent

Utilities for manipulating (Laurent) polynomials with SymPy: - reciprocal transforms f(x) -> f(x^{-1}) - normalization for ordinary and Laurent polynomials - symmetric normalization under t ↔ 1/t - canonicalization under permutations of variables

module

parsing

Lightweight parsers for KnotPy notations.

progressbar

Lightweight text progress bar for terminal loops, with tick() and multiprocessing support.

set_utils

Utilities for working with sets and layered (leveled) collections.

string_utils

String utilities for KnotPy.

test