Skip to content

Commit

Permalink
change conventions for doubled tangles
Browse files Browse the repository at this point in the history
The ∞-filling is now the unknot filling
  • Loading branch information
cbz20 committed Feb 12, 2022
1 parent cd71d9a commit 37c69fa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion sources/headers/Tangles.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class Tangle
Tangle add( const std::string &twists ) const;///< add a tangle \c twists to the bottom of the tangle. The format of \c twists is as the first component of \ref tangle_input.
Tangle quotient() const;///< computes the quotient of a symmetric knot under a string inversion
Tangle complete_symmetry() const;///< completes a symmetric knot to a full knot
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.
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 \f$\infty\f$-filling is the unknot filling.
void simplify_diagram();///< attempt to simplify a tangle diagram. This is currently only implemented for non-symmetric tangles. This function relies on simplify().
int writhe() const;///< signed number of crossings
};
Expand Down
39 changes: 26 additions & 13 deletions sources/modules/Tangles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1036,44 +1036,57 @@ void Tangle::doubled ()
{
std::string tanglestring;
Cut new_top;
for ( const bool &orient : cuts.front() ) {
new_top.push_back ( orient );
new_top.push_back ( orient );
int c {0};
// if we started with a 1-1-knot, add cap to get the framing right
if ( this->top_orient().size() == 1 && this->bot_orient().size() == 1 ) {
if ( this->top_orient().front() == 1 ){
tanglestring += "l0.";
} else {
tanglestring += "r0.";
};
new_top = cuts.front();
c=1;
} else {
for ( const bool &orient : cuts.front() ) {
new_top.push_back ( orient );
new_top.push_back ( orient );
};
};
// now deal with the main part of the tangle
for ( const Slice &slice : slices ) {
switch ( slice.first ) {
case 'x':
case 'y':
tanglestring += slice.first +
std::to_string ( 2*slice.second+1 ) + ".";
std::to_string ( c+2*slice.second+1 ) + ".";
tanglestring += slice.first +
std::to_string ( 2*slice.second ) + ".";
std::to_string ( c+2*slice.second ) + ".";
tanglestring += slice.first +
std::to_string ( 2*slice.second+2 ) + ".";
std::to_string ( c+2*slice.second+2 ) + ".";
tanglestring += slice.first +
std::to_string ( 2*slice.second+1 ) + ".";
std::to_string ( c+2*slice.second+1 ) + ".";
break;
case 'l':
case 'r':
tanglestring += slice.first +
std::to_string ( 2*slice.second ) + ".";
std::to_string ( c+2*slice.second ) + ".";
tanglestring += slice.first +
std::to_string ( 2*slice.second+1 ) + ".";
std::to_string ( c+2*slice.second+1 ) + ".";
break;
case 'u':
tanglestring += slice.first +
std::to_string ( 2*slice.second+1 ) + ".";
std::to_string ( c+2*slice.second+1 ) + ".";
tanglestring += slice.first +
std::to_string ( 2*slice.second ) + ".";
std::to_string ( c+2*slice.second ) + ".";
break;
}
};
// if we started with a 1-1-knot, make sure that the linking number between the two strands is 0.
if ( this->top_orient().size() == 1 && this->bot_orient().size() == 1 ) {
int n {this->writhe()};
std::string s {"x0.x0."};
std::string s {"x1.x1."};
if (n<0){
s = "y0.y0.";
s = "y1.y1.";
n *= -1;
};
for ( int i=0; i<n; ++i){
Expand Down

0 comments on commit 37c69fa

Please sign in to comment.