native#

Default (native) KnotPy notation with all diagram information stored. It is similar to EM notation.

Notation example (without attributes):

SpatialGraph Crossing a [(‘b’,0),(‘b’,2),(‘b’,1),(‘v’,0)] Crossing b [(‘a’,0),(‘a’,2),(‘a’,1),(‘u’,0)] Vertex u [(‘b’,3)] Vertex v [(‘a’,3)]

Notation example (with attributes):

SpatialGraph {‘name’:’x1’,’color’:’red’} Crossing a [(‘b’,0,{‘color’:’Orange’}),(‘b’,2,{‘color’:’Orange’}),(‘b’,1,{‘color’:’Orange’}),(‘v’,0,{‘color’:’Orange’})] {‘color’:’blue’} Crossing b [(‘a’,0,{‘color’:’Orange’}),(‘a’,2,{‘color’:’Orange’}),(‘a’,1,{‘color’:’Orange’}),(‘u’,0,{‘color’:’Orange’})] {‘color’:’blue’} Vertex u [(‘b’,3,{‘color’:’Orange’})] {} Vertex v [(‘a’,3,{‘color’:’Orange’})] {}

See “Ewing, B. & Millett, K. C. in The mathematical heritage of CF Gauss 225–266 (World Scientific, 1991)”.

Functions

from_knotpy_notation(text)

to_knotpy_notation(k)

Returns KnotPy notation of planar diagram (native python structures list, tuples, dicts,... encoding the whole diagram) Example: "SpatialGraph {'name':'x1','color':'red'} Vertex a [('b',0,{'color':'Orange'})] {} Vertex b [('a',0,{'color':'Orange'})] {}".