Regina Calculation Engine
Classes | Public Types | Static Public Attributes | Protected Attributes | List of all members
regina::detail::TriangulationBase< dim > Class Template Reference

Provides core functionality for dim-dimensional triangulations. More...

#include <triangulation/detail/triangulation.h>

Inheritance diagram for regina::detail::TriangulationBase< dim >:
regina::Triangulation< 4 >

Classes

class  TopologyLock
 Creates a temporary lock on the topological properties of the given triangulation. More...
 

Public Types

typedef std::vector< Simplex< dim > * >::const_iterator SimplexIterator
 Used to iterate through top-dimensional simplices. More...
 
typedef std::vector< Component< dim > * >::const_iterator ComponentIterator
 Used to iterate through connected components. More...
 
typedef std::vector< BoundaryComponent< dim > * >::const_iterator BoundaryComponentIterator
 Used to iterate through boundary components. More...
 

Public Member Functions

Constructors and Destructors
 TriangulationBase ()
 Default constructor. More...
 
 TriangulationBase (const TriangulationBase< dim > &copy)
 Creates a new copy of the given triangulation. More...
 
 TriangulationBase (const TriangulationBase< dim > &copy, bool cloneProps)
 Creates a new copy of the given triangulation, with the option of whether or not to clone its computed properties also. More...
 
 ~TriangulationBase ()
 Destroys this triangulation. More...
 
Simplices
size_t size () const
 Returns the number of top-dimensional simplices in the triangulation. More...
 
const std::vector< Simplex< dim > * > & simplices () const
 Returns all top-dimensional simplices in the triangulation. More...
 
Simplex< dim > * simplex (size_t index)
 Returns the top-dimensional simplex at the given index in the triangulation. More...
 
const Simplex< dim > * simplex (size_t index) const
 Returns the top-dimensional simplex at the given index in the triangulation. More...
 
Simplex< dim > * newSimplex ()
 Creates a new top-dimensional simplex and adds it to this triangulation. More...
 
Simplex< dim > * newSimplex (const std::string &desc)
 Creates a new top-dimensional simplex with the given description and adds it to this triangulation. More...
 
void removeSimplex (Simplex< dim > *simplex)
 Removes the given top-dimensional simplex from this triangulation. More...
 
void removeSimplexAt (size_t index)
 Removes the top-dimensional simplex at the given index in this triangulation. More...
 
void removeAllSimplices ()
 Removes all simplices from the triangulation. More...
 
void swapContents (Triangulation< dim > &other)
 Swaps the contents of this and the given triangulation. More...
 
void moveContentsTo (Triangulation< dim > &dest)
 Moves the contents of this triangulation into the given destination triangulation, without destroying any pre-existing contents. More...
 
Skeletal Queries
size_t countComponents () const
 Returns the number of connected components in this triangulation. More...
 
size_t countBoundaryComponents () const
 Returns the number of boundary components in this triangulation. More...
 
template<int subdim>
size_t countFaces () const
 Returns the number of subdim-faces in this triangulation. More...
 
std::vector< size_t > fVector () const
 Returns the f-vector of this triangulation, which counts the number of faces of all dimensions. More...
 
const std::vector< Component< dim > * > & components () const
 Returns all connected components of this triangulation. More...
 
const std::vector< BoundaryComponent< dim > * > & boundaryComponents () const
 Returns all boundary components of this triangulation. More...
 
template<int subdim>
const FaceList< dim, subdim > & faces () const
 Returns an object that allows iteration through and random access to all subdim-faces of this triangulation. More...
 
Component< dim > * component (size_t index) const
 Returns the requested connected component of this triangulation. More...
 
BoundaryComponent< dim > * boundaryComponent (size_t index) const
 Returns the requested boundary component of this triangulation. More...
 
template<int subdim>
Face< dim, subdim > * face (size_t index) const
 Returns the requested subdim-face of this triangulation. More...
 
Basic Properties
bool isEmpty () const
 Determines whether this triangulation is empty. More...
 
bool isValid () const
 Determines if this triangulation is valid. More...
 
bool hasBoundaryFacets () const
 Determines if this triangulation has any boundary facets. More...
 
size_t countBoundaryFacets () const
 Returns the total number of boundary facets in this triangulation. More...
 
bool isOrientable () const
 Determines if this triangulation is orientable. More...
 
bool isConnected () const
 Determines if this triangulation is connected. More...
 
bool isOriented () const
 Determines if this triangulation is oriented; that is, if the vertices of its top-dimensional simplices are labelled in a way that preserves orientation across adjacent facets. More...
 
long eulerCharTri () const
 Returns the Euler characteristic of this triangulation. More...
 
Algebraic Properties
const GroupPresentationfundamentalGroup () const
 Returns the fundamental group of this triangulation. More...
 
void simplifiedFundamentalGroup (GroupPresentation *newGroup)
 Notifies the triangulation that you have simplified the presentation of its fundamental group. More...
 
const AbelianGrouphomology () const
 Returns the first homology group for this triangulation. More...
 
const AbelianGrouphomologyH1 () const
 Returns the first homology group for this triangulation. More...
 
Skeletal Transformations
void orient ()
 Relabels the vertices of top-dimensional simplices in this triangulation so that all simplices are oriented consistently, if possible. More...
 
void reflect ()
 Relabels the vertices of top-dimensional simplices in this triangulation so that all simplices reflect their orientation. More...
 
template<int k>
bool pachner (Face< dim, k > *f, bool check=true, bool perform=true)
 Checks the eligibility of and/or performs a (dim + 1 - k)-(k + 1) Pachner move about the given k-face. More...
 
Subdivisions, Extensions and Covers
void makeDoubleCover ()
 Converts this triangulation into its double cover. More...
 
void barycentricSubdivision ()
 Does a barycentric subdivision of the triangulation. More...
 
bool finiteToIdeal ()
 Converts each real boundary component into a cusp (i.e., an ideal vertex). More...
 
Decompositions
size_t splitIntoComponents (Packet *componentParent=nullptr, bool setLabels=true)
 Splits a disconnected triangulation into many smaller triangulations, one for each component. More...
 
Isomorphism Testing
bool isIdenticalTo (const Triangulation< dim > &other) const
 Determines if this triangulation is combinatorially identical to the given triangulation. More...
 
std::unique_ptr< Isomorphism< dim > > isIsomorphicTo (const Triangulation< dim > &other) const
 Determines if this triangulation is combinatorially isomorphic to the given triangulation. More...
 
std::unique_ptr< Isomorphism< dim > > isContainedIn (const Triangulation< dim > &other) const
 Determines if an isomorphic copy of this triangulation is contained within the given triangulation, possibly as a subcomplex of some larger component (or components). More...
 
template<typename OutputIterator >
size_t findAllIsomorphisms (const Triangulation< dim > &other, OutputIterator output) const
 Finds all ways in which this triangulation is combinatorially isomorphic to the given triangulation. More...
 
template<typename OutputIterator >
size_t findAllSubcomplexesIn (const Triangulation< dim > &other, OutputIterator output) const
 Finds all ways in which an isomorphic copy of this triangulation is contained within the given triangulation, possibly as a subcomplex of some larger component (or components). More...
 
bool makeCanonical ()
 Relabel the top-dimensional simplices and their vertices so that this triangulation is in canonical form. More...
 
Building Triangulations
void insertTriangulation (const Triangulation< dim > &source)
 Inserts a copy of the given triangulation into this triangulation. More...
 
void insertConstruction (size_t nSimplices, const int adjacencies[][dim+1], const int gluings[][dim+1][dim+1])
 Inserts a given triangulation into this triangulation, where the given triangulation is described by a pair of integer arrays. More...
 
Exporting Triangulations
std::string isoSig (Isomorphism< dim > **relabelling=0) const
 Constructs the isomorphism signature for this triangulation. More...
 
std::string dumpConstruction () const
 Returns C++ code that can be used with insertConstruction() to reconstruct this triangulation. More...
 

Static Public Attributes

static constexpr int dimension = dim
 A compile-time constant that gives the dimension of the triangulation. More...
 

Protected Attributes

MarkedVector< Simplex< dim > > simplices_
 The top-dimensional simplices that form the triangulation. More...
 
MarkedVector< BoundaryComponent< dim > > boundaryComponents_
 The components that form the boundary of the triangulation. More...
 
bool valid_
 Is this triangulation valid? See isValid() for details on what this means. More...
 
int topologyLock_
 If non-zero, this will cause Triangulation<dim>::clearAllProperties() to preserve any computed properties that related to the manifold (as opposed to the specific triangulation). More...
 

Importing Triangulations

template<int , int , int >
struct FaceCalculator
 
template<int , int >
struct BoundaryComponentCalculator
 
template<int , int >
struct PachnerHelper
 
template<int , int >
class WeakFaceList
 
class regina::detail::XMLTriangulationReaderBase< dim >
 
TriangulationBaseoperator= (const TriangulationBase &)=delete
 
static Triangulation< dim > * fromIsoSig (const std::string &sig)
 Recovers a full triangulation from an isomorphism signature. More...
 
static size_t isoSigComponentSize (const std::string &sig)
 Deduces the number of top-dimensional simplices in a connected triangulation from its isomorphism signature. More...
 
void ensureSkeleton () const
 Ensures that all "on demand" skeletal objects have been calculated. More...
 
bool calculatedSkeleton () const
 Determines whether the skeletal objects and properties of this triangulation have been calculated. More...
 
void calculateSkeleton ()
 Calculates all skeletal objects for this triangulation. More...
 
void clearBaseProperties ()
 Clears all properties that are managed by this base class. More...
 
void swapBaseProperties (TriangulationBase< dim > &other)
 Swaps all properties that are managed by this base class, including skeletal data, with the given triangulation. More...
 
void writeXMLBaseProperties (std::ostream &out) const
 Writes a chunk of XML containing properties of this triangulation. More...
 

Detailed Description

template<int dim>
class regina::detail::TriangulationBase< dim >

Provides core functionality for dim-dimensional triangulations.

Such a triangulation is represented by the class Triangulation<dim>, which uses this as a base class. End users should not need to refer to TriangulationBase directly.

See the Triangulation class notes for further information.

Note that this class does not derive from Output. This is to avoid clashes with the output code inherited from Packet. Specifically:

Python:\n This base class is not present, but the "end user" class
Triangulation<dim> is.
Template Parameters
dimthe dimension of the triangulation. This must be between 2 and 15 inclusive.

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

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