Tangle class

consists of a list of slices (Slice) and a list of cuts (Cut)

There is also a boolean value symmetry which is true iff the tangle represents a knot with strong inversion and a boolean value fixed_orientations which is true iff the orientation on the input tangle string was inconsistent and orientations had to be changed during initialization

Constructors, destructors, conversion operators

Tangle(const File& file)
construct tangle from File file
Tangle(std::string input, Cut top_orient, bool auto_correct = true)
standard constructor

Public functions

auto add(const std::string& twists) const -> Tangle
add a tangle twists to the bottom of the tangle. The format of twists is as the first component of tangle_input.
auto bot_orient() const -> std::vector<bool>
bottom Cut
template<typename Coeff>
auto CobComplex(Complex<CobObj, CobMor, Coeff> cx = {}, const bool& with_feedback = true) const -> Complex<CobObj, CobMor, Coeff>
computes the cobordism complex for a tangle $T$
auto complete_symmetry() const -> Tangle
completes a symmetric knot to a full knot
auto complexity() const -> size_t
complexity of the tangle; equal to the sum of the cubes of the lengths of all cuts
void doubled()
double each strand of a tangle diagram. For example, this can be used to generate four-ended tangles from 1-1-knots. For those knots, the framing of the resulting cap-trivial tangle is chosen such that the linking number between the two strands is 0 and the $\infty$ -filling is the unknot filling.
auto draw_svg_orient(const Cut& cut, const int& ycoord, const int& pref_orient = 2) const -> std::string
svg-string adding orientations according to cut at the y-coordinate ycoord ; pref_orient is the preferred orientation, which is 0 (down), 1 (up) or 2 (both).
auto draw_svg_slice(const unsigned int& si, const unsigned int& level) const -> std::string
svg-string for a single slice
auto draw_svg_slice_fill(const std::vector<Slice>& sliceL, const unsigned int& max, const unsigned int& level) const -> std::string
svg-string adding all vertical strands in a slice with a crossing
void flip_orient_at_index(int i)
changes the orientation of the strand at the index i at the bottom of the tangle, counted from the left, starting with 0
auto is_symmetric() const -> bool
true iff symmetry is true
auto n_ended(const size_t& n) -> bool
true if tangle is n-ended and has at least one top tangle end (which is the reduction point) and one bottom tangle end
void print(const bool& orient = 1) const
prints a string represenation of a tangle into the terminal. orient is as in to_string().
auto quotient() const -> Tangle
computes the quotient of a symmetric knot under a strong inversion
void record_new_orientations(const File& file) const
adds a comment to file which records the top Cut; this is used if the input tangle was inconsistent and the constructor changed the top cut to fix orientations.
void simplify_diagram()
attempt to simplify a tangle diagram. This is currently only implemented for non-symmetric tangles. This function relies on simplify().
auto tanglestring() const -> std::string
convert tangle back into input string, the first component of tangle_input
void to_file(const File& file) const
generates a file file.kht which specifies the tangle in the format tangle_input and adds metadata
auto to_string(const int& index, const bool& orient) const -> std::string
string representation of a single slice of the tangle. If orient is 1, all strands are oriented, otherwise only the orientations of caps (↶/↷) are included.
void to_svg(const std::string& metadata, const std::string& name, const bool& orient = false, const bool& transparent = false) const
create svg file of the tangle diagram
auto top_orient() const -> std::vector<bool>
top Cut
auto writhe() const -> int
signed number of crossings

Function documentation

Tangle::Tangle(const File& file)

construct tangle from File file

Tangle::Tangle(std::string input, Cut top_orient, bool auto_correct = true)

standard constructor

The pair (input, top_orient) have the same format as tangle_input. Tangles are built from top to bottom, hence all cuts are determined by this data. If auto_correct is true, the constructor will attempt to auto-correct the orientation of strands if the input is inconsistent

template<typename Coeff>
Complex<CobObj, CobMor, Coeff> Tangle::CobComplex(Complex<CobObj, CobMor, Coeff> cx = {}, const bool& with_feedback = true) const

computes the cobordism complex for a tangle $T$

The first argument is a cobordism complex $C'$ that we tensor with the cobordim complex $C(T)$ for $T$ , gluing the top of $C(T)$ to the bottom of $C'$ . If this argument is empty, we replace it by a complex consisting of a single crossingless tangle, namely the identity tangle on the same number of strands as there are endpoints at the top of $T$ .

If the second argument is false, some feedback in the terminal concerning the status of the computation will be suppressed.