orient#
- orient(k)#
Orient an unoriented diagram using the default edge directions.
This picks the natural direction for every edge returned by
knotpy.algorithms.topology.edges()
.- Parameters:
k (PlanarDiagram) – Unoriented diagram.
- Returns:
Oriented diagram.
- Return type:
Example
>>> import knotpy as kp >>> k = kp.knot("3_1") >>> kp.orient(k) Diagram named 3_1 a → X(b3o c0i c3i b0o), b → X(a3i c2o c1o a0i), c → X(a1o b2i b1i a2o)