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

A deprecated synonym for NIsomorphism, provided for backward compatibility only. More...

#include <triangulation/nisomorphism.h>

Inheritance diagram for regina::NIsomorphismDirect:
regina::NIsomorphism regina::NGenericIsomorphism< 3 > regina::ShareableObject regina::boost::noncopyable

Public Types

typedef DimTraits< dim >
::Isomorphism 
Isomorphism
 The isomorphism class used by triangulations of this specific dimension. More...
 
typedef DimTraits< dim >::Perm Perm
 The permutation class used to glue together facets of simplices when building triangulations in this dimension. More...
 
typedef DimTraits< dim >::Simplex Simplex
 The class that represents a top-level simplex of a triangulation in this dimension. More...
 
typedef DimTraits< dim >
::Triangulation 
Triangulation
 The triangulation class specific to this dimension. More...
 

Public Member Functions

 NIsomorphismDirect (unsigned sourceTetrahedra)
 Creates a new isomorphism with no initialisation. More...
 
 NIsomorphismDirect (const NIsomorphism &cloneMe)
 Creates a new isomorphism identical to the given isomorphism. More...
 
unsigned getSourceTetrahedra () const
 Returns the number of tetrahedra in the source triangulation associated with this isomorphism. More...
 
int & tetImage (unsigned sourceTet)
 Determines the image of the given source tetrahedron under this isomorphism. More...
 
int tetImage (unsigned sourceTet) const
 Determines the image of the given source tetrahedron under this isomorphism. More...
 
NPerm4facePerm (unsigned sourceTet)
 Returns a read-write reference to the permutation that is applied to the four faces of the given source tetrahedron under this isomorphism. More...
 
NPerm4 facePerm (unsigned sourceTet) const
 Determines the permutation that is applied to the four faces of the given source tetrahedron under this isomorphism. More...
 
unsigned getSourceSimplices () const
 Returns the number of simplices in the source triangulation associated with this isomorphism. More...
 
int & simpImage (unsigned sourceSimp)
 Determines the image of the given source simplex under this isomorphism. More...
 
int simpImage (unsigned sourceSimp) const
 Determines the image of the given source simplex under this isomorphism. More...
 
PermfacetPerm (unsigned sourceSimp)
 Returns a read-write reference to the permutation that is applied to the (dim + 1) facets of the given source simplex under this isomorphism. More...
 
Perm facetPerm (unsigned sourceSimp) const
 Determines the permutation that is applied to the (dim + 1) facets of the given source simplex under this isomorphism. More...
 
NFacetSpec< dim > operator[] (const NFacetSpec< dim > &source) const
 Determines the image of the given source simplex facet under this isomorphism. More...
 
bool isIdentity () const
 Determines whether or not this is an identity isomorphism. More...
 
Triangulationapply (const Triangulation *original) const
 This NGenericIsomorphism object represents a combinatorial identification from a triangulation T to a triangulation U. More...
 
void applyInPlace (Triangulation *tri) const
 Applies this isomorphism to the given triangulation, modifying the given triangulation directly. More...
 
void writeTextShort (std::ostream &out) const
 Writes this object in short text format to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 Writes this object in long text format to the given output stream. More...
 
Input and Output
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 Isomorphismrandom (unsigned nSimplices)
 Returns a random isomorphism for the given number of simplices. More...
 

Protected Attributes

unsigned nSimplices_
 The number of simplices in the source triangulation. More...
 
int * simpImage_
 The simplex of the destination triangulation that each simplex of the source triangulation maps to. More...
 
PermfacetPerm_
 The permutation applied to the facets of each source simplex. More...
 

Detailed Description

A deprecated synonym for NIsomorphism, provided for backward compatibility only.

See NIsomorphism for further details (and please use the NIsomorphism class instead).

Deprecated:
All of the functionality that NIsomorphismDirect used to provide in old versions of Regina has now been moved into the parent class NIsomorphism. The NIsomorphismDirect class is now an empty subclass of NIsomorphism, provided for backward compatibility only, and should not be used in new applications. This class will be removed from Regina in the near future.
Python:
Not present.

Member Typedef Documentation

The isomorphism class used by triangulations of this specific dimension.

Typically this is a subclass of NGenericIsomorphism<dim>.

typedef DimTraits<dim>::Perm regina::NGenericIsomorphism< dim >::Perm
inherited

The permutation class used to glue together facets of simplices when building triangulations in this dimension.

typedef DimTraits<dim>::Simplex regina::NGenericIsomorphism< dim >::Simplex
inherited

The class that represents a top-level simplex of a triangulation in this dimension.

The triangulation class specific to this dimension.

Constructor & Destructor Documentation

regina::NIsomorphismDirect::NIsomorphismDirect ( unsigned  sourceTetrahedra)
inline

Creates a new isomorphism with no initialisation.

Parameters
sourceTetrahedrathe number of tetrahedra in the source triangulation associated with this isomorphism; this may be zero.
regina::NIsomorphismDirect::NIsomorphismDirect ( const NIsomorphism cloneMe)
inline

Creates a new isomorphism identical to the given isomorphism.

Parameters
cloneMethe isomorphism upon which to base the new isomorphism.

Member Function Documentation

Triangulation* regina::NGenericIsomorphism< dim >::apply ( const Triangulation original) const
inherited

This NGenericIsomorphism object represents a combinatorial identification from a triangulation T to a triangulation U.

This routine produces the triangulation U, i.e. the range. The input parameter (original) represents the domain, T.

The given triangulation (call this T) is not modified in any way. A new triangulation (call this U) is returned, so that this isomorphism represents a one-to-one, onto and boundary complete isomorphism from T to U. That is, T and U are combinatorially identical triangulations, and this isomorphism describes the corresponding mapping between simplex and simplex facets.

The resulting triangulation U is newly created, and must be destroyed by the caller of this routine.

There are several preconditions to this routine. This routine does a small amount of sanity checking (and returns 0 if an error is detected), but it certainly does not check the entire set of preconditions. It is up to the caller of this routine to verify that all of the following preconditions are met.

Precondition
The number of simplices in the given triangulation is precisely the number returned by getSourceSimplices() for this isomorphism.
This is a valid isomorphism (i.e., it has been properly initialised, so that all simplex images are non-negative and distinct, and all facet permutations are real permutations of (0,...,dim).
Each simplex image for this isomorphism lies between 0 and getSourceSimplices()-1 inclusive (i.e., this isomorphism does not represent a mapping from a smaller triangulation into a larger triangulation).
Parameters
originalthe triangulation to which this isomorphism should be applied.
Returns
the resulting new triangulation, or 0 if a problem was encountered (i.e., an unmet precondition was noticed).
void regina::NGenericIsomorphism< dim >::applyInPlace ( Triangulation tri) const
inherited

Applies this isomorphism to the given triangulation, modifying the given triangulation directly.

This is similar to apply(), except that instead of creating a new triangulation, the simplices and vertices of the given triangulation are modified directly.

See apply() for further details on how this operation is performed.

As with apply(), there are several preconditions to this routine. This routine does a small amount of sanity checking (and returns without changes if an error is detected), but it certainly does not check the entire set of preconditions. It is up to the caller of this routine to verify that all of the following preconditions are met.

Precondition
The number of simplices in the given triangulation is precisely the number returned by getSourceSimplices() for this isomorphism.
This is a valid isomorphism (i.e., it has been properly initialised, so that all simplex images are non-negative and distinct, and all facet permutations are real permutations of (0,...,dim).
Each simplex image for this isomorphism lies between 0 and getSourceSimplices()-1 inclusive (i.e., this isomorphism does not represent a mapping from a smaller triangulation into a larger triangulation).
Parameters
trithe triangulation to which this isomorphism should be applied.
std::string regina::ShareableObject::detail ( ) const
inherited

Returns the output from writeTextLong() as a string.

Returns
a long text representation of this object.
NPerm4 & regina::NIsomorphism::facePerm ( unsigned  sourceTet)
inlineinherited

Returns a read-write reference to the permutation that is applied to the four faces of the given source tetrahedron under this isomorphism.

Face i of source tetrahedron sourceTet will be mapped to face facePerm(sourceTet)[i] of tetrahedron tetImage(sourceTet).

This is a convenience routine specific to three dimensions, and is identical to the dimension-agnostic routine facetPerm().

Python:
Not present, though the read-only version of this routine is.
Parameters
sourceTetthe index of the source tetrahedron containing the original four faces; this must be between 0 and getSourceSimplices()-1 inclusive.
Returns
a read-write reference to the permutation applied to the four faces of the source tetrahedron.
NPerm4 regina::NIsomorphism::facePerm ( unsigned  sourceTet) const
inlineinherited

Determines the permutation that is applied to the four faces of the given source tetrahedron under this isomorphism.

Face i of source tetrahedron sourceTet will be mapped to face facePerm(sourceTet)[i] of tetrahedron tetImage(sourceTet).

This is a convenience routine specific to three dimensions, and is identical to the dimension-agnostic routine facetPerm().

Parameters
sourceTetthe index of the source tetrahedron containing the original four faces; this must be between 0 and getSourceSimplices()-1 inclusive.
Returns
the permutation applied to the four faces of the source tetrahedron.
Perm& regina::NGenericIsomorphism< dim >::facetPerm ( unsigned  sourceSimp)
inherited

Returns a read-write reference to the permutation that is applied to the (dim + 1) facets of the given source simplex under this isomorphism.

Facet i of source simplex sourceSimp will be mapped to facet facetPerm(sourceSimp)[i] of simplex simpImage(sourceSimp).

Python:
This is not available for Python users, even in the dimension-specific subclasses. However, the read-only version of this routine is.
Parameters
sourceSimpthe index of the source simplex containing the original (dim + 1) facets; this must be between 0 and getSourceSimplices()-1 inclusive.
Returns
a read-write reference to the permutation applied to the facets of the source simplex.
Perm regina::NGenericIsomorphism< dim >::facetPerm ( unsigned  sourceSimp) const
inherited

Determines the permutation that is applied to the (dim + 1) facets of the given source simplex under this isomorphism.

Facet i of source simplex sourceSimp will be mapped to face facetPerm(sourceSimp)[i] of simplex simpImage(sourceSimp).

Parameters
sourceSimpthe index of the source simplex containing the original (dim + 1) facets; this must be between 0 and getSourceSimplices()-1 inclusive.
Returns
the permutation applied to the facets of the source simplex.
unsigned regina::NGenericIsomorphism< dim >::getSourceSimplices ( ) const
inherited

Returns the number of simplices in the source triangulation associated with this isomorphism.

Note that this is always less than or equal to the number of simplices in the destination triangulation.

Returns
the number of simplices in the source triangulation.
unsigned regina::NIsomorphism::getSourceTetrahedra ( ) const
inlineinherited

Returns the number of tetrahedra in the source triangulation associated with this isomorphism.

Note that this is always less than or equal to the number of tetrahedra in the destination triangulation.

This is a convenience routine specific to three dimensions, and is identical to the dimension-agnostic routine getSourceSimplices().

Returns
the number of tetrahedra in the source triangulation.
bool regina::NGenericIsomorphism< dim >::isIdentity ( ) const
inherited

Determines whether or not this is an identity isomorphism.

In an identity isomorphism, each simplex image is itself, and within each simplex the facet/vertex permutation is the identity permutation.

Returns
true if this is an identity isomorphism, or false otherwise.
NFacetSpec<dim> regina::NGenericIsomorphism< dim >::operator[] ( const NFacetSpec< dim > &  source) const
inherited

Determines the image of the given source simplex facet under this isomorphism.

Note that a value only is returned; this routine cannot be used to alter the isomorphism.

Parameters
sourcethe given source simplex facet; this must be one of the (dim + 1) facets of one of the getSourceSimplices() simplices in the source triangulation.
Returns
the image of the source simplex facet under this isomorphism.
static Isomorphism* regina::NGenericIsomorphism< dim >::random ( unsigned  nSimplices)
staticinherited

Returns a random isomorphism for the given number of simplices.

This isomorphism will reorder simplices 0 to nSimplices-1 in a random fashion, and for each simplex a random permutation of its (dim + 1) vertices will be selected.

The isomorphism will be newly constructed, and must be destroyed by the caller of this routine. The new isomorphism will be of the appropriate dimension-specific subclass (e.g., NIsomorphism for dim=3, or Dim2Isomorphism for dim=2).

Note that both the STL random number generator and the standard C function rand() are used in this routine. All possible isomorphisms for the given number of simplices are equally likely.

Parameters
nSimplicesthe number of simplices that the new isomorphism should operate upon.
Returns
the newly constructed random isomorphism.
int& regina::NGenericIsomorphism< dim >::simpImage ( unsigned  sourceSimp)
inherited

Determines the image of the given source simplex under this isomorphism.

Python:
This is not available for Python users, even in the dimension-specific subclasses. However, the read-only version of this routine is.
Parameters
sourceSimpthe index of the source simplex; this must be between 0 and getSourceSimplices()-1 inclusive.
Returns
a reference to the index of the destination simplex that the source simplex maps to.
int regina::NGenericIsomorphism< dim >::simpImage ( unsigned  sourceSimp) const
inherited

Determines the image of the given source simplex under this isomorphism.

Parameters
sourceSimpthe index of the source simplex; this must be between 0 and getSourceSimplices()-1 inclusive.
Returns
the index of the destination simplex that the source simplex maps to.
std::string regina::ShareableObject::str ( ) const
inherited

Returns the output from writeTextShort() as a string.

Python:
This implements the __str__() function.
Returns
a short text representation of this object.
int & regina::NIsomorphism::tetImage ( unsigned  sourceTet)
inlineinherited

Determines the image of the given source tetrahedron under this isomorphism.

This is a convenience routine specific to three dimensions, and is identical to the dimension-agnostic routine simpImage().

Python:
Not present, though the read-only version of this routine is.
Parameters
sourceTetthe index of the source tetrahedron; this must be between 0 and getSourceSimplices()-1 inclusive.
Returns
a reference to the index of the destination tetrahedron that the source tetrahedron maps to.
int regina::NIsomorphism::tetImage ( unsigned  sourceTet) const
inlineinherited

Determines the image of the given source tetrahedron under this isomorphism.

This is a convenience routine specific to three dimensions, and is identical to the dimension-agnostic routine simpImage().

Parameters
sourceTetthe index of the source tetrahedron; this must be between 0 and getSourceSimplices()-1 inclusive.
Returns
the index of the destination tetrahedron that the source tetrahedron maps to.
std::string regina::ShareableObject::toString ( ) const
inlineinherited

A deprecated alias for str(), which returns the output from writeTextShort() as a string.

Deprecated:
This routine has (at long last) been deprecated; use the simpler-to-type str() instead.
Returns
a short text representation of this object.
std::string regina::ShareableObject::toStringLong ( ) const
inlineinherited

A deprecated alias for detail(), which returns the output from writeTextLong() as a string.

Deprecated:
This routine has (at long last) been deprecated; use the simpler-to-type detail() instead.
Returns
a long text representation of this object.
void regina::NGenericIsomorphism< dim >::writeTextLong ( std::ostream &  out) const
virtualinherited

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.

Python:
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.

Reimplemented from regina::ShareableObject.

void regina::NGenericIsomorphism< dim >::writeTextShort ( std::ostream &  out) const
virtualinherited

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.

Python:
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.

Implements regina::ShareableObject.

Member Data Documentation

Perm* regina::NGenericIsomorphism< dim >::facetPerm_
protectedinherited

The permutation applied to the facets of each source simplex.

unsigned regina::NGenericIsomorphism< dim >::nSimplices_
protectedinherited

The number of simplices in the source triangulation.

int* regina::NGenericIsomorphism< dim >::simpImage_
protectedinherited

The simplex of the destination triangulation that each simplex of the source triangulation maps to.


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

Copyright © 1999-2014, 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@debian.org).