Regina 7.0 Calculation Engine
Classes | Typedefs | Functions
Implementation details

Implementation details that end users should not need to reference directly. More...

Classes

class  regina::detail::BoundaryComponentBase< dim >
 Helper class that provides core functionality for a boundary component of a dim-dimensional triangulation. More...
 
class  regina::detail::ComponentBase< dim >
 Helper class that provides core functionality for a connected component of a dim-manifold triangulation. More...
 
class  regina::detail::ExampleFromLowDim< dim, available >
 Helper class that builds various dim-dimensional triangulations from (dim-1)-dimensional triangulations. More...
 
class  regina::detail::ExampleFromLowDim< dim, false >
 Helper class that builds various dim-dimensional triangulations from (dim-1)-dimensional triangulations. More...
 
class  regina::detail::ExampleBase< dim >
 Provides core functionality for constructing example dim-dimensional triangulations. More...
 
class  regina::detail::FaceEmbeddingBase< dim, subdim >
 Helper class that provides core functionality for describing how a subdim-face of a dim-dimensional triangulation appears within each top-dimensional simplex. More...
 
class  regina::detail::FaceBase< dim, subdim >
 Helper class that provides core functionality for a subdim-face in the skeleton of a dim-dimensional triangulation. More...
 
class  regina::detail::FaceNumberingAPI< dim, subdim >
 Placeholder class that outlines the functions provided by FaceNumbering<dim, subdim>. More...
 
class  regina::detail::FaceNumberingImpl< dim, subdim, codim >
 Implementation details for numbering subdim-faces of a dim-dimensional simplex. More...
 
class  regina::detail::FacetPairingBase< dim >
 Provides core functionality for facet pairings (that is, dual graphs) of dim-dimensional triangulations. More...
 
struct  regina::detail::CallableArg< Action, pos >
 A traits class that deduces the type of the argument in a given position for a callable object. More...
 
struct  regina::detail::RetriangulateActionTraits< Object, Action, FirstArg >
 A traits class that analyses callable objects that are passed to retriangulation or link rewriting functions. More...
 
class  regina::detail::SimplexBase< dim >
 Helper class that provides core functionality for a top-dimensional simplex in a dim-manifold triangulation. More...
 
struct  regina::detail::Strings< dim_ >
 Contains a collection of compile-time constant strings that describe features of the dimension dim. More...
 
class  regina::detail::TriangulationBase< dim >
 Provides core functionality for dim-dimensional triangulations. More...
 

Typedefs

template<class Object , bool withSig>
using regina::detail::RetriangulateActionFunc = typename std::conditional< withSig, std::function< bool(const std::string &, Object &&)>, std::function< bool(Object &&)> >::type
 Declares the internal type used to store a callable action that is passed to a retriangulation or link rewriting function. More...
 

Functions

template<class Object , bool withSig>
bool regina::detail::retriangulateInternal (const Object &obj, int height, unsigned nThreads, ProgressTrackerOpen *tracker, RetriangulateActionFunc< Object, withSig > &&action)
 The common implementation of all retriangulation and link rewriting functions. More...
 
template<int dim>
void regina::swap (Triangulation< dim > &lhs, Triangulation< dim > &rhs)
 Swaps the contents of the two given triangulations. More...
 

Detailed Description

Implementation details that end users should not need to reference directly.

Typedef Documentation

◆ RetriangulateActionFunc

template<class Object , bool withSig>
using regina::detail::RetriangulateActionFunc = typedef typename std::conditional<withSig, std::function<bool(const std::string&, Object&&)>, std::function<bool(Object&&)> >::type

Declares the internal type used to store a callable action that is passed to a retriangulation or link rewriting function.

A retriangulation or link rewriting function can work with arbitrary callable objects. However, the implementations of such functions are long and should not be dragged into the main headers. The core purpose of this class is therefore to coalesce the arbitrary action types down to just two fixed types (depending on whether the action includes a text signature (e.g., an isomorphism signature) in its initial argument(s)). This means that the retriangulation or rewriting code can be templated on a single boolean parameter, and so we can instatiate it completely in Regina's library and keep the implementation details out of the main headers.

The current implementation packages the action up as a std::function object with either a single argument (a triangulation/link) or a pair of arguments (a text signature and a triangulation/link). Any additional arguments to the retriangulation/rewriting action will be bound in the std::function object). This implementation is subject to change in future versions of Regina.

Template Parameters
Objectthe class providing the retriangulation/rewriting function, such as regina::Triangulation<dim> or regina::Link.
withSigtrue if we are storing an action that includes both a text signature and a triangulation in its initial argument(s), or false if we are storing an action whose argument list begins with just a triangulation/link.

Function Documentation

◆ retriangulateInternal()

template<class Object , bool withSig>
bool regina::detail::retriangulateInternal ( const Object &  obj,
int  height,
unsigned  nThreads,
ProgressTrackerOpen tracker,
RetriangulateActionFunc< Object, withSig > &&  action 
)

The common implementation of all retriangulation and link rewriting functions.

This routine performs exactly the task described by Link::rewrite() or Triangluation<dim>::retriangulate() (for those dimensions where it is defined), with the following differences:

  • This routine assumes any preconditions have already been checked, and exceptions thrown if they failed;
  • The action passed to this routine uses a much less templated type, which means the implementation can be kept out of the public API headers.

See Triangulation<dim>::retriangulate() or Link::rewrite() for full details on what this routine actually does.

Template Parameters
Objectthe class providing the retriangulation/rewriting function, such as regina::Triangulation<dim> or regina::Link.
withSigtrue if we are storing an action that includes both a text signature and a triangulation in its initial argument(s), or false if we are storing an action whose argument list begins with just a triangulation/link.
Parameters
objthe object being retriangulated or rewritten.
heightthe maximum number of top-dimensional simplices or crossings to allow beyond the initial number in obj, or a negative number if this should not be bounded.
nThreadsthe number of threads to use. If this is 1 or smaller then the routine will run single-threaded.
trackera progress tracker through which progress will be reported, or null if no progress reporting is required.
actiona function to call for each triangulation that is found.
Returns
true if some call to action returned true (thereby terminating the search early), or false if the search ran to completion.

◆ swap()

template<int dim>
void regina::swap ( Triangulation< dim > &  lhs,
Triangulation< dim > &  rhs 
)

Swaps the contents of the two given triangulations.

This global routine simply calls Triangulation<dim>::swap(); it is provided so that Triangulation<dim> meets the C++ Swappable requirements.

See Triangulation<dim>::swap() for more details.

Note
This swap function is not marked noexcept, since it fires packet change events which may in turn call arbitrary code via any registered packet listeners.
Parameters
lhsthe triangulation whose contents should be swapped with rhs.
rhsthe triangulation whose contents should be swapped with lhs.

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).