Regina Calculation Engine
|
Represents a single crossing in a link diagram. More...
#include <link/link.h>
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 | |
Crossing & | operator= (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 |
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.
|
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.
|
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.
__str__()
.
|
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.