Regina Calculation Engine
|
A reference to an outgoing edge from a node of a model graph for a knot or link. More...
#include <link/modellinkgraph.h>
Public Member Functions | |
ModelLinkGraphArc () | |
Initialises this to a null arc. More... | |
ModelLinkGraphArc (ModelLinkGraphNode *node, int arc) | |
Initialises this to the given arc exiting the given node of a model graph. More... | |
ModelLinkGraphArc (const ModelLinkGraphArc &)=default | |
Default copy constructor. More... | |
ModelLinkGraphNode * | node () const |
The node of the model graph from which this arc exits. More... | |
int | arc () const |
Indicates which arc this is amongst the four arcs exiting the underlying node of the model graph. More... | |
bool | operator== (const ModelLinkGraphArc &rhs) const |
Tests whether this and the given arc reference are identical. More... | |
bool | operator!= (const ModelLinkGraphArc &rhs) const |
Tests whether this and the given arc reference are not identical. More... | |
ModelLinkGraphArc & | operator= (const ModelLinkGraphArc &)=default |
Default assignment operator. More... | |
ModelLinkGraphArc | opposite () const |
Returns the arc that exits the same node as this, but from the opposite side. More... | |
ModelLinkGraphArc | traverse () const |
Returns the same edge of the model graph, but seen from the other endpoint. More... | |
ModelLinkGraphArc | next () const |
Returns the next arc after this when walking through the graph as though it were a link, in a direction away from the current node. More... | |
ModelLinkGraphArc | prev () const |
Returns the previous arc before this when walking through the graph as though it were a link, in a direction away from the* current node. More... | |
ModelLinkGraphArc & | operator++ () |
Changes to the next outgoing link arc from the same node. More... | |
ModelLinkGraphArc | operator++ (int) |
Changes to the next outgoing link arc from the same node. More... | |
ModelLinkGraphArc & | operator-- () |
Changes to the previous outgoing link arc from the same node. More... | |
ModelLinkGraphArc | operator-- (int) |
Changes to the previous outgoing link arc from the same node. More... | |
operator bool () const | |
Tests whether this is a non-null arc. More... | |
Friends | |
class | ModelLinkGraph |
A reference to an outgoing edge from a node of a model graph for a knot or link.
Edges of model graphs are not directed, and so the same edge will appear twice as a ModelLinkGraphArc (once from each of its endpoints).
This class is a simple wrapper that stores (i) a pointer to the relevant node of the graph; and (ii) an integer to denote which of the four outgoing arcs we are using from that node. Recall that the four outgoing arcs for each node are indexed in clockwise order.
A "null arc" is one whose node is the null pointer.
These objects are small enough to pass around by value.