Regina Calculation Engine
|
Represents a signature of a splitting surface in a closed 3-manifold triangulation. More...
#include <split/nsignature.h>
Public Member Functions | |
NSignature (const NSignature &sig) | |
Creates a new signature that is a clone of the given signature. More... | |
virtual | ~NSignature () |
Destroys this signature. More... | |
unsigned | getOrder () const |
Returns the order of this signature. More... | |
NTriangulation * | triangulate () const |
Returns a newly created 3-manifold triangulation corresponding to this splitting surface signature. More... | |
void | writeCycles (std::ostream &out, const std::string &cycleOpen, const std::string &cycleClose, const std::string &cycleJoin) const |
Writes a string representation of this signature to the given output stream. More... | |
virtual void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. More... | |
Input and Output | |
virtual void | writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. More... | |
std::string | str () const |
Returns the output from writeTextShort() as a string. More... | |
std::string | toString () const |
A deprecated alias for str(), which returns the output from writeTextShort() as a string. More... | |
std::string | detail () const |
Returns the output from writeTextLong() as a string. More... | |
std::string | toStringLong () const |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string. More... | |
Static Public Member Functions | |
static NSignature * | parse (const std::string &sig) |
Parses the given signature string. More... | |
static int | cycleCmp (const NSignature &sig1, unsigned cycle1, unsigned start1, int dir1, unsigned *relabel1, const NSignature &sig2, unsigned cycle2, unsigned start2, int dir2, unsigned *relabel2) |
Lexicographically compares the results of transformations upon two given cycles. More... | |
Friends | |
class | regina::NSigPartialIsomorphism |
class | regina::NSigCensus |
Represents a signature of a splitting surface in a closed 3-manifold triangulation.
A splitting surface is (for these purposes) a compact normal surface consisting of precisely one quad per tetrahedron and no other normal (or almost normal) discs.
A signature of order n is a string consisting of 2n letters arranged into cycles, where n is the number of quads in the splitting surface. From a signature, the corresponding splitting surface and then the entire 3-manifold triangulation can be recreated.
A signature of order n uses the first n letters of the alphabet, each precisely twice. Case is important; the meaning of a letter changes according to whether it appears in upper-case or lower-case.
Each letter represents an individual quadrilateral (the two occurrences of the letter representing the quadrilateral's two sides). Each cycle represents a chain of quadrilaterals joined together in the splitting surface. The case of a letter represents in which direction a quadrilateral is traversed within a cycle.
Cycles are arranged into cycle groups, where a cycle group consists of a series of consecutive cycles all of the same length.
An example of a signature is (abc)(a)(b)(c)
. This signature is of order 3 and contains two cycle groups, the first being (abc)
and the second being (a)(b)(c)
.
A signature cannot represent a splitting surface with more than 26 quadrilaterals.
For further details on splitting surfaces and their signatures, consult Minimal triangulations and normal surfaces, Burton, PhD thesis, available from the Regina website.
regina::NSignature::NSignature | ( | const NSignature & | sig | ) |
Creates a new signature that is a clone of the given signature.
sig | the signature to clone. |
|
inlinevirtual |
Destroys this signature.
|
static |
Lexicographically compares the results of transformations upon two given cycles.
Even if transformations are specified, the underlying signatures will not be changed.
This comparison is not case-sensitive.
sig1 | the signature containing the first cycle to examine. |
cycle1 | specifies which cycle to examine in signature sig1. This must be less than the total number of cycles in sig1. |
start1 | allows the first cycle to be transformed by rotation; this parameter is the new starting position of the first cycle. This must be between 0 and sig1.getCycleLength(cycle1)-1 inclusive. |
dir1 | allows the first cycle to be transformed by reversal; this parameter must be positive to use an unreversed cycle or negative to use a reversed cycle. |
relabel1 | allows the first cycle to be transformed by relabelling; this parameter must be an array of size at least sig1.getOrder() mapping old labels 0,1,... (representing letters A,B,...) to new labels (which must also be 0,1,..., possibly in a different order). This parameter may be 0 if no relabelling is to be used. |
sig2 | the signature containing the second cycle to examine. |
cycle2 | specifies which cycle to examine in signature sig2. This must be less than the total number of cycles in sig2. |
start2 | allows the second cycle to be transformed by rotation; this parameter is the new starting position of the second cycle. This must be between 0 and sig2.getCycleLength(cycle2)-1 inclusive. |
dir2 | allows the second cycle to be transformed by reversal; this parameter must be positive to use an unreversed cycle or negative to use a reversed cycle. |
relabel2 | allows the second cycle to be transformed by relabelling; this parameter must be an array of size at least sig2.getOrder() mapping old labels 0,1,... (representing letters A,B,...) to new labels (which must also be 0,1,..., possibly in a different order). This parameter may be 0 if no relabelling is to be used. |
|
inherited |
Returns the output from writeTextLong() as a string.
|
inline |
Returns the order of this signature.
The order is the number of quads in the corresponding splitting surface.
|
static |
Parses the given signature string.
Punctuation characters in the given string will be interpreted as separating cycles. All whitespace will be ignored.
Examples of valid signatures are "(ab)(bC)(Ca)"
and "AAb-bc-C"
. See the class notes for further details on what constitutes a valid signature.
sig | a string representation of a splitting surface signature. |
|
inherited |
Returns the output from writeTextShort() as a string.
__str__()
function.
|
inlineinherited |
A deprecated alias for str(), which returns the output from writeTextShort() as a string.
|
inlineinherited |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string.
NTriangulation* regina::NSignature::triangulate | ( | ) | const |
Returns a newly created 3-manifold triangulation corresponding to this splitting surface signature.
void regina::NSignature::writeCycles | ( | std::ostream & | out, |
const std::string & | cycleOpen, | ||
const std::string & | cycleClose, | ||
const std::string & | cycleJoin | ||
) | const |
Writes a string representation of this signature to the given output stream.
out | the output stream to which to write. |
cycleOpen | the text to write at the beginning of a cycle (such as "(" ). |
cycleClose | the text to write at the end of a cycle (such as ")" ). |
cycleJoin | the text to write between two cycles. |
|
inlinevirtualinherited |
Writes this object in long text format to the given output stream.
The output should provide the user with all the information they could want. The output should be human-readable, should not contain extremely long lines (so users can read the output in a terminal), and should end with a final newline.
The default implementation of this routine merely calls writeTextShort() and adds a newline.
out | the output stream to which to write. |
Reimplemented in regina::NSnapPeaTriangulation, regina::NGroupPresentation, regina::NHomMarkedAbelianGroup, regina::NNormalSurfaceList, regina::NTetrahedron, regina::NSatRegion, regina::NVertex, regina::NEdge, regina::Dim2Triangle, regina::NTriangle, regina::NLayeredSolidTorus, regina::NHomGroupPresentation, regina::NGenericIsomorphism< dim >, regina::NGenericIsomorphism< 2 >, regina::NGenericIsomorphism< 3 >, regina::NTriangulation, regina::NComponent, regina::NTxICore, regina::NTriSolidTorus, regina::NAngleStructureList, regina::Dim2Edge, regina::NBoundaryComponent, regina::NLayeredChain, regina::Dim2Vertex, regina::Dim2Component, regina::NScript, regina::NAugTriSolidTorus, regina::NSpiralSolidTorus, regina::NSurfaceFilterProperties, regina::NLayeredTorusBundle, regina::NManifold, regina::NPlugTriSolidTorus, regina::NMatrixInt, regina::NBlockedSFSTriple, regina::NPluggedTorusBundle, regina::Dim2Triangulation, regina::NSurfaceSubset, regina::NLayeredLensSpace, regina::NLayeredLoop, regina::NFileInfo, regina::NBlockedSFSLoop, regina::NSnappedBall, regina::NBlockedSFSPair, regina::Dim2BoundaryComponent, regina::NTrivialTri, regina::NL31Pillow, regina::NLayeredChainPair, regina::NText, regina::NSurfaceFilterCombination, and regina::NBlockedSFS.
|
inlinevirtual |
Writes this object in short text format to the given output stream.
The output should be human-readable, should fit on a single line, and should not end with a newline.
out | the output stream to which to write. |
Implements regina::ShareableObject.