Regina Calculation Engine
Public Types | Public Member Functions | Static Public Member Functions | List of all members
regina::ModelLinkGraph Class Reference

Represents an undirected 4-valent planar graph with a specific planar embedding. More...

#include <link/modellinkgraph.h>

Inheritance diagram for regina::ModelLinkGraph:
regina::Output< ModelLinkGraph >

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 &copy)
 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...
 
ModelLinkGraphNodenode (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 ModelLinkGraphCellscells () const
 Returns details of the cellular decomposition of the sphere that is induced by this graph. More...
 
std::pair< ModelLinkGraphArc, ModelLinkGraphArcfindFlype (const ModelLinkGraphArc &from) const
 TODO: Flype is between arc– and arc, i.e., over the region defined by cell(arc). More...
 
ModelLinkGraphflype (const ModelLinkGraphArc &from, const ModelLinkGraphArc &left, const ModelLinkGraphArc &right) const
 TODO: Document. More...
 
ModelLinkGraphflype (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...
 
ModelLinkGraphoperator= (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 ModelLinkGraphfromPlantri (const std::string &plantri)
 Builds a graph from a line of plantri output. More...
 

Detailed Description

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.

Member Function Documentation

◆ detail()

std::string regina::Output< ModelLinkGraph , 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< ModelLinkGraph , 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< ModelLinkGraph , 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).