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

Represents a signature of a splitting surface in a closed 3-manifold triangulation. More...

#include <split/signature.h>

Inheritance diagram for regina::Signature:
regina::ShortOutput< Signature > regina::Output< Signature, false >

Public Member Functions

 Signature (const Signature &sig)
 Creates a new signature that is a clone of the given signature. More...
 
 ~Signature ()
 Destroys this signature. More...
 
unsigned order () const
 Returns the order of this signature. More...
 
Triangulation< 3 > * 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...
 
void writeTextShort (std::ostream &out) const
 
Writes a short text representation of this object to the given output stream. More...
 
Signatureoperator= (const Signature &)=delete
 
void writeTextLong (std::ostream &out) const
 
A default implementation for detailed output. 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...
 

Static Public Member Functions

static Signatureparse (const std::string &sig)
 Parses the given signature string. More...
 
static int cycleCmp (const Signature &sig1, unsigned cycle1, unsigned start1, int dir1, unsigned *relabel1, const Signature &sig2, unsigned cycle2, unsigned start2, int dir2, unsigned *relabel2)
 
Lexicographically compares the results of transformations upon two given cycles. More...
 

Friends

class regina::SigPartialIsomorphism
 
class regina::SigCensus
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Signature()

regina::Signature::Signature ( const Signature sig)

Creates a new signature that is a clone of the given signature.

Parameters
sigthe signature to clone.

◆ ~Signature()

regina::Signature::~Signature ( )
inline

Destroys this signature.

Member Function Documentation

◆ cycleCmp()

static int regina::Signature::cycleCmp ( const Signature sig1,
unsigned  cycle1,
unsigned  start1,
int  dir1,
unsigned *  relabel1,
const Signature sig2,
unsigned  cycle2,
unsigned  start2,
int  dir2,
unsigned *  relabel2 
)
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.

Precondition
The two specified cycles have the same length.
Python
Not present.
Parameters
sig1the signature containing the first cycle to examine.
cycle1specifies which cycle to examine in signature sig1. This must be less than the total number of cycles in sig1.
start1allows 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.
dir1allows 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.
relabel1allows the first cycle to be transformed by relabelling; this parameter must be an array of size at least sig1.order() 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.
sig2the signature containing the second cycle to examine.
cycle2specifies which cycle to examine in signature sig2. This must be less than the total number of cycles in sig2.
start2allows 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.
dir2allows 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.
relabel2allows the second cycle to be transformed by relabelling; this parameter must be an array of size at least sig2.order() 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.
Returns
-1, 1 or 0 if the transformed first cycle is lexicographically less than, greater than or equal to the transformed second cycle respectively.

◆ detail()

std::string regina::Output< Signature , supportsUtf8 >::detail ( ) const
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.

◆ order()

unsigned regina::Signature::order ( ) const
inline

Returns the order of this signature.

The order is the number of quads in the corresponding splitting surface.

Returns
the order of this signature.

◆ parse()

static Signature* regina::Signature::parse ( const std::string &  sig)
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.

Precondition
The given string contains at least one letter.
Parameters
siga string representation of a splitting surface signature.
Returns
a corresponding newly created signature, or 0 if the given string was invalid.

◆ str()

std::string regina::Output< Signature , supportsUtf8 >::str ( ) const
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
In addition to str(), this is also used as the Python "stringification" function __str__().
Returns
a short text representation of this object.

◆ triangulate()

Triangulation<3>* regina::Signature::triangulate ( ) const

Returns a newly created 3-manifold triangulation corresponding to this splitting surface signature.

Returns
the corresponding triangulation.

◆ utf8()

std::string regina::Output< Signature , supportsUtf8 >::utf8 ( ) const
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.

◆ writeCycles()

void regina::Signature::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.

Python
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.
cycleOpenthe text to write at the beginning of a cycle (such as "(").
cycleClosethe text to write at the end of a cycle (such as ")").
cycleJointhe text to write between two cycles.

◆ writeTextLong()

void regina::ShortOutput< Signature , false >::writeTextLong ( std::ostream &  out) const
inlineinherited


A default implementation for detailed output.

This routine simply calls T::writeTextShort() and appends a final newline.

Python
Not present.
Parameters
outthe output stream to which to write.

◆ writeTextShort()

void regina::Signature::writeTextShort ( std::ostream &  out) const
inline


Writes a short text representation of this object to the given output stream.

Python
Not present.
Parameters
outthe output stream to which to write.

The documentation for this class was generated from the following file:

Copyright © 1999-2021, 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).