Regina Calculation Engine
|
Represents an undirected 4-valent planar graph with a specific planar embedding. More...
#include <link/modellinkgraph.h>
Public Types | |
typedef void(* | Use) (Link *, void *) |
A routine that can do arbitrary processing upon a knot or link. More... | |
Public Member Functions | |
ModelLinkGraph () | |
Constructs an empty graph. More... | |
ModelLinkGraph (const ModelLinkGraph ©) | |
Constructs a new copy of the given graph. More... | |
~ModelLinkGraph () | |
Destroys this graph. More... | |
size_t | size () const |
Returns the number of nodes in this graph. More... | |
ModelLinkGraphNode * | node (size_t index) const |
Returns the node at the given index within this graph. More... | |
void | swapContents (ModelLinkGraph &other) |
Swaps the contents of this and the given graph. More... | |
void | reflect () |
Converts this graph into its reflection. More... | |
const ModelLinkGraphCells & | cells () const |
Returns details of the cellular decomposition of the sphere that is induced by this graph. More... | |
std::pair< ModelLinkGraphArc, ModelLinkGraphArc > | findFlype (const ModelLinkGraphArc &from) const |
TODO: Flype is between arc– and arc, i.e., over the region defined by cell(arc). More... | |
ModelLinkGraph * | flype (const ModelLinkGraphArc &from, const ModelLinkGraphArc &left, const ModelLinkGraphArc &right) const |
TODO: Document. More... | |
ModelLinkGraph * | flype (const ModelLinkGraphArc &from) const |
TODO: Document. More... | |
void | generateMinimalLinks (Use use, void *useArgs=0) const |
TODO: Document. More... | |
std::string | plantri () const |
Outputs this graph in the ASCII text format used by plantri. More... | |
std::string | canonicalPlantri (bool useReflection=true, bool tight=false) const |
Outputs a text representation of this graph in the plantri ASCII format, using a canonical relabelling of nodes and arcs, and with optional compression. More... | |
void | writeTextShort (std::ostream &out) const |
Writes a short text representation of this graph to the given output stream. More... | |
void | writeTextLong (std::ostream &out) const |
Writes a detailed text representation of this graph to the given output stream. More... | |
ModelLinkGraph & | operator= (const ModelLinkGraph &)=delete |
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... | |
Static Public Member Functions | |
static ModelLinkGraph * | fromPlantri (const std::string &plantri) |
Builds a graph from a line of plantri output. More... | |
Represents an undirected 4-valent planar graph with a specific planar embedding.
This can be used as the model graph for a knot or link diagram, where each node of the graph becomes a crossing.
Current this class does not support circular graph components (which, in a link diagram, would correspond to zero-crossing unknot components of the link).
This class is primarily designed for enumerating knots and links. If you wish to study the underlying graph of an existing link, you do not need to create a ModelLinkGraph - instead the Link class already gives you direct access to the graph structure. In particular, if you include link/graph.h, you can use a Link directly as a directed graph type with the Boost Graph Library.
|
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.