Improvements to the Tangle class#69
Open
Shakugannotorch wants to merge 12 commits into
Open
Conversation
Co-authored-by: Copilot <copilot@github.com>
More tests pending Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
_rebuild() bug fixed simplify() bug fixed. All three Reidemeister moves work for Tangles but not the pickup moves TODO: 1. decide whether to fix describe() or replace it entirely with PD_code() 2. fix isosig() for Tangles 3. implement rot_num()
describe and isosig kept using old_tangles TODO: 1. rot_num 2. flip 3. computation of RT invariants 4. is_planar
…creating pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is to improve the Tangle class while updating the link class slightly.
Feature additions
simplify('basic')andsimplify('level')(the pickup moves are not implemented for now).PD_code(KnotTheory = False, min_strand_index = 0)method for Tangles and allow Tangles to be created from PD code (the PD codes for tangles is a slightly decorated version of those for links, see the docstring)reverse_orientation(component_index)for both Tangles and Links for easy manipulation of their orientations.crossingattribute.Behavior changes
Tangle.boundary_strands, which is connected toTangle.adjacent.Tangle.crossingsnow only contains Crossings after build; any strand inTangle.crossingswill be fused and if it hascomponent_idx, thecomponent_idxwill be saved in the correspondingboundary_strandsat the start of the component.__repr__()for Tangles so that it now also prints the number of components, the number of crossings and the shape of the boundary similar to Links; the previous__repr__()is replaced by__str__()for Tangles.__add__()and__mul__(), erases the orientations on both tangles and creates a new one on the new tangle (without any inheritance), in order to avoid conflicts on orientationsafter gluing.
Bug fixes
_rebuild(same_components_and_orientations = True)now properly preserve the orientations for links; previously it reverse all orientations instead.The previous code for Tangle is preserved as old_tangle.py, which is used for preserving the methods
describe()andisosig()for tangles.The improvement to the Tangle class is essential for subsequent implementation of computing Reshetikhin--Turaev knot polynomials in SnapPy using R-matrices.