Regina Calculation Engine
Public Member Functions | Friends | List of all members
regina::Crossing Class Reference

Represents a single crossing in a link diagram. More...

#include <link/link.h>

Inheritance diagram for regina::Crossing:
regina::MarkedElement regina::Output< Crossing >

Public Member Functions

int index () const
 Returns the index of this crossing within the overall link. More...
 
int sign () const
 Returns the sign of this crossing. More...
 
StrandRef upper ()
 Returns a reference to the strand running over this crossing. More...
 
StrandRef lower ()
 Returns a reference to the strand running under this crossing. More...
 
StrandRef over ()
 Returns a reference to the strand running over this crossing. More...
 
StrandRef under ()
 Returns a reference to the strand running under this crossing. More...
 
StrandRef strand (int which)
 Returns a reference to one of the two strands of the link that pass each other at this crossing. More...
 
StrandRef next (int strand) const
 Returns the crossing reference that immediately follows this when walking forward in the direction of the link along one of the two strands that pass at this crossing. More...
 
StrandRef prev (int strand) const
 Returns the crossing reference that immediately precedes this when walking backward against the direction of the link along one of the two strands that pass at this crossing. More...
 
void writeTextShort (std::ostream &out) const
 Writes a short text representation of this object to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 Writes a detailed text representation of this object to the given output stream. More...
 
 Crossing (const Crossing &)=delete
 
Crossingoperator= (const Crossing &)=delete
 
size_t markedIndex () const
 Returns the index at which this object is stored in an MarkedVector. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 

Friends

class Link
 
class ModelLinkGraph
 
class Tangle
 
class XMLLinkCrossingsReader
 
class XMLLinkConnectionsReader
 

Detailed Description

Represents a single crossing in a link diagram.

The two strands of the link that run over and under the crossing respectively can be accessed through routines such as over(), under(), upper(), lower(), and strand().

Each crossing has a sign, which is either positive (denoted by +1) or negative (denoted by -1):

If a link has n crossings, then these are numbered 0,...,n-1. The number assigned to this crossing can be accessed by calling index(). Note that crossings in a link may be reindexed when other crossings are added or removed - if you wish to track a particular crossing through such operations then you should use a pointer to the relevant Crossing object instead.

Member Function Documentation

◆ detail()

std::string regina::Output< Crossing , false >::detail
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ str()

std::string regina::Output< Crossing , false >::str
inherited

Returns a short text representation of this object.

This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.

Python:\n In addition to str(), this is also used as the
Python "stringification" function str().
Returns
a short text representation of this object.

◆ utf8()

std::string regina::Output< Crossing , false >::utf8
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.

Returns
a short text representation of this object.

The documentation for this class was generated from the following file:

Copyright © 1999-2018, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).