regina::GluingPerms< dim > Class Template Reference
Census of Triangulations

Represents a specific set of gluing permutations to complement a particular pairwise matching of simplex facets. More...

`#include <census/gluingperms.h>`

## Public Member Functions

| GluingPerms (const GluingPerms< dim > &cloneMe)
| Creates a new set of gluing permutations that is a clone of the given permutation set. More...
| GluingPerms (std::istream &in)
| Reads a new set of gluing permutations from the given input stream. More...
virtual | ~GluingPerms ()
| Deallocates any memory used by this structure. More...
bool | inputError () const
| Was an error found during construction from an input stream? More...
unsigned | size () const
| Returns the total number of simplices under consideration. More...
const FacetPairing< dim > * | facetPairing () const
| Returns the specific pairing of simplex facets that this set of gluing permutations complements. More...
Perm< dim+1 > | gluingPerm (const FacetSpec< dim > &source) const
| Returns the gluing permutation associated with the given simplex facet. More...
Perm< dim+1 > | gluingPerm (unsigned simp, unsigned facet) const
| Returns the gluing permutation associated with the given simplex facet. More...
Triangulation< dim > * | triangulate () const
| Returns a newly created triangulation as modelled by this set of gluing permutations and the associated simplex facet pairing. More...
virtual void | dumpData (std::ostream &out) const
| Dumps all internal data in a plain text format to the given output stream. More...

## Protected Member Functions

| GluingPerms (const FacetPairing< dim > *pairing)
| Creates a new permutation set. More...
int & | permIndex (const FacetSpec< dim > &source)
| Returns the index into array Perm<dim+1>::Sn_1 describing how the the given facet is joined to its partner. More...
int & | permIndex (unsigned simp, unsigned facet)
| Returns the index into array Perm<dim+1>::Sn_1 describing how the the given facet is joined to its partner. More...
const int & | permIndex (const FacetSpec< dim > &source) const
| Returns the index into array Perm<dim+1>::Sn_1 describing how the the given facet is joined to its partner. More...
const int & | permIndex (unsigned simp, unsigned facet) const
| Returns the index into array Perm<dim+1>::Sn_1 describing how the the given facet is joined to its partner. More...
int | gluingToIndex (const FacetSpec< dim > &source, const Perm< dim+1 > &gluing) const
| Returns the index into array Perm<dim+1>::Sn_1 corresponding to the given gluing permutation from the given facet to its partner. More...
int | gluingToIndex (unsigned simp, unsigned facet, const Perm< dim+1 > &gluing) const
| Returns the index into array Perm<dim+1>::Sn_1 corresponding to the given gluing permutation from the given facet to its partner. More...
Perm< dim+1 > | indexToGluing (const FacetSpec< dim > &source, int index) const
| Returns the gluing permutation from the given facet to its partner that corresponds to the given index into array Perm<dim+1>::Sn_1. More...
Perm< dim+1 > | indexToGluing (unsigned simp, unsigned facet, int index) const
| Returns the gluing permutation from the given facet to its partner that corresponds to the given index into array Perm<dim+1>::Sn_1. More...

## Protected Attributes

const FacetPairing< dim > * | pairing_
| The facet pairing that this permutation set complements. More...
int * | permIndices_
| The index into array Perm<dim+1>::Sn_1 describing how each simplex facet is glued to its partner. More...
bool | inputError_
| Has an error occurred during construction from an input stream? More...

## Detailed Description

### template<int dim>
class regina::GluingPerms< dim >

Represents a specific set of gluing permutations to complement a particular pairwise matching of simplex facets.

Given a pairwise matching of facets (as described by class FacetPairing<dim>), each facet that is matched with some other facet will have an associated permutation of (dim + 1) elements.

If a facet is matched with some other facet, the two associated permutations in this set will be inverses. If a facet is left deliberately unmatched, it will have no associated permutation in this set.

Such a set of permutations models part of the structure of a triangulation, in which each simplex facet that is glued to another facet has a corresponding gluing permutation (and the matched facet has the inverse gluing permutation).

Headers:
  Parts of this template class are implemented in a separate header (gluingperms-impl.h), which is not included automatically by this file. However, typical end users should never need this extra header, since Regina's calculation engine already includes explicit instantiations for standard dimensions.

Python:
  Not available.

Template Parameters

  dim | the dimension of the underlying triangulation that is being modelled. This must be between 2 and 15 inclusive.

## Constructor & Destructor Documentation

## GluingPerms() [1/3]

template<int dim>

regina::GluingPerms< dim >::GluingPerms | ( | const GluingPerms< dim > & | cloneMe | ) |

Creates a new set of gluing permutations that is a clone of the given permutation set.

Parameters

  cloneMe | the gluing permutations to clone.

## GluingPerms() [2/3]

template<int dim>

regina::GluingPerms< dim >::GluingPerms | ( | std::istream & | in | ) |

Reads a new set of gluing permutations from the given input stream.

This routine reads data in the format written by dumpData().

If the data found in the input stream is invalid or incorrectly formatted, the routine inputError() will return `true` but the contents of this object will be otherwise undefined.

Warning
  The data format is liable to change between Regina releases. Data in this format should be used on a short-term temporary basis only.

Parameters

  in | the input stream from which to read.

## ~GluingPerms()

template<int dim>

regina::GluingPerms< dim >::~GluingPerms | ( |  | ) |

inline virtual

Deallocates any memory used by this structure.

## GluingPerms() [3/3]

template<int dim>

regina::GluingPerms< dim >::GluingPerms | ( | const FacetPairing< dim > * | pairing | ) |

inline protected

Creates a new permutation set.

All internal arrays will be allocated but not initialised.

Precondition
  The given facet pairing is connected, i.e., it is possible to reach any simplex from any other simplex via a series of matched facet pairs.
  The given facet pairing is in canonical form as described by FacetPairing::isCanonical(). Note that all facet pairings constructed by FacetPairing::findAllPairings() are of this form.

Parameters

  pairing | the specific pairing of simplex facets that this permutation set will complement.

## Member Function Documentation

## dumpData()

template<int dim>

virtual void regina::GluingPerms< dim >::dumpData | ( | std::ostream & | out | ) | const

virtual

Dumps all internal data in a plain text format to the given output stream.

This object can be recreated from this text data by calling the input stream constructor for this class.

This routine may be useful for transferring objects from one processor to another.

Note that subclass data is written after superclass data, so it is safe to dump data from a subclass and then recreate a new superclass object from that data (though subclass-specific information will of course be lost).

Warning
  The data format is liable to change between Regina releases. Data in this format should be used on a short-term temporary basis only.

Parameters

  out | the output stream to which the data should be written.

Reimplemented in regina::HyperbolicMinSearcher, regina::ClosedPrimeMinSearcher, regina::CompactSearcher, regina::EulerSearcher, regina::GluingPermSearcher< 4 >, regina::GluingPermSearcher< 3 >, and regina::GluingPermSearcher< 2 >.

## facetPairing()

template<int dim>

const FacetPairing< dim > * regina::GluingPerms< dim >::facetPairing | ( |  | ) | const

inline

Returns the specific pairing of simplex facets that this set of gluing permutations complements.

Returns
  the corresponding simplex facet pairing.

## gluingPerm() [1/2]

template<int dim>

Perm< dim+1 > regina::GluingPerms< dim >::gluingPerm | ( | const FacetSpec< dim > & | source | ) | const

inline

Returns the gluing permutation associated with the given simplex facet.

Precondition
  The given facet is actually paired with some other facet in the underlying pairwise matching (see routine facetPairing()).
  The given facet is a real simplex facet (not boundary, before-the-start or past-the-end).

Parameters

  source | the simplex facet under investigation.

Returns
  the associated gluing permutation.

## gluingPerm() [2/2]

template<int dim>

Perm< dim+1 > regina::GluingPerms< dim >::gluingPerm | ( | unsigned | simp,
|  | unsigned | facet
| ) |  | const

inline

Returns the gluing permutation associated with the given simplex facet.

Precondition
  The given facet is actually paired with some other facet in the underlying pairwise matching (see routine facetPairing()).

Parameters

  simp | the simplex under investigation (this must be strictly less than the total number of simplices under consideration).
  facet | the facet of the given simplex under investigation (between 0 and dim inclusive).

Returns
  the associated gluing permutation.

## gluingToIndex() [1/2]

template<int dim>

int regina::GluingPerms< dim >::gluingToIndex | ( | const FacetSpec< dim > & | source,
|  | const Perm< dim+1 > & | gluing
| ) |  | const

protected

Returns the index into array Perm<dim+1>::Sn_1 corresponding to the given gluing permutation from the given facet to its partner.

This need not be the index into Perm<dim+1>::Sn_1 that is currently stored for the given facet.

Indices into array Perm<dim+1>::Sn_1 are stored internally in the array permIndices_. Full gluing permutations on the other hand are used in constructing triangulations.

Precondition
  The given simplex facet has a partner according to the underlying facet pairing, i.e., is not a boundary facet.
  If the given simplex facet and its partner are facets x and y of their respective simplices, then the given gluing permutation maps x to y.

Parameters

  source | the simplex facet under investigation.
  gluing | a possible gluing permutation from the given simplex facet to its partner according to the underlying facet pairing.

Returns
  the index into Perm<dim+1>::Sn_1 corresponding to the given gluing permutation; this will be between 0 and dim!-1 inclusive.

## gluingToIndex() [2/2]

template<int dim>

int regina::GluingPerms< dim >::gluingToIndex | ( | unsigned | simp,
|  | unsigned | facet,
|  | const Perm< dim+1 > & | gluing
| ) |  | const

protected

Returns the index into array Perm<dim+1>::Sn_1 corresponding to the given gluing permutation from the given facet to its partner.

This need not be the index into Perm<dim+1>::Sn_1 that is currently stored for the given facet.

Indices into array Perm<dim+1>::Sn_1 are stored internally in the array permIndices_. Full gluing permutations on the other hand are used in constructing triangulations.

Precondition
  The given simplex facet has a partner according to the underlying facet pairing, i.e., is not a boundary facet.
  If the given simplex facet and its partner are facets x and y of their respective simplices, then the given gluing permutation maps x to y.

Parameters

  simp | the simplex under investigation; this must be strictly less than the total number of simplices under consideration.
  facet | the facet of the given simplex under investigation; this must be between 0 and dim inclusive.
  gluing | a possible gluing permutation from the given simplex facet to its partner according to the underlying facet pairing.

Returns
  the index into Perm<dim+1>::Sn_1 corresponding to the given gluing permutation; this will be between 0 and dim!-1 inclusive.

## indexToGluing() [1/2]

template<int dim>

Perm< dim+1 > regina::GluingPerms< dim >::indexToGluing | ( | const FacetSpec< dim > & | source,
|  | int | index
| ) |  | const

inline protected

Returns the gluing permutation from the given facet to its partner that corresponds to the given index into array Perm<dim+1>::Sn_1.

This index into Perm<dim+1>::Sn_1 need not be the index that is currently stored for the given facet.

Indices into array Perm<dim+1>::Sn_1 are stored internally in the array permIndices_. Full gluing permutations on the other hand are used in constructing triangulations.

If the given simplex facet and its partner according to the underlying facet pairing are facets x and y of their respective simplices, then the resulting gluing permutation will map x to y.

Precondition
  The given simplex facet has a partner according to the underlying facet pairing, i.e., is not a boundary facet.

Parameters

  source | the simplex facet under investigation.
  index | an index into Perm<dim+1>::Sn_1; this must be between 0 and dim!-1 inclusive.

Returns
  the gluing permutation corresponding to the given index into Perm<dim+1>::Sn_1.

## indexToGluing() [2/2]

template<int dim>

Perm< dim+1 > regina::GluingPerms< dim >::indexToGluing | ( | unsigned | simp,
|  | unsigned | facet,
|  | int | index
| ) |  | const

inline protected

Returns the gluing permutation from the given facet to its partner that corresponds to the given index into array Perm<dim+1>::Sn_1.

This index into Perm<dim+1>::Sn_1 need not be the index that is currently stored for the given facet.

Indices into array Perm<dim+1>::Sn_1 are stored internally in the array permIndices_. Full gluing permutations on the other hand are used in constructing triangulations.

If the given simplex facet and its partner according to the underlying facet pairing are facets x and y of their respective simplices, then the resulting gluing permutation will map x to y.

Precondition
  The given simplex facet has a partner according to the underlying facet pairing, i.e., is not a boundary facet.

Parameters

  simp | the simplex under investigation; this must be strictly less than the total number of simplices under consideration.
  facet | the facet of the given simplex under investigation; this must be between 0 and dim inclusive.
  index | an index into Perm<dim+1>::Sn_1; this must be between 0 and dim!-1 inclusive.

Returns
  the gluing permutation corresponding to the given index into Perm<dim+1>::Sn_1.

## inputError()

template<int dim>

bool regina::GluingPerms< dim >::inputError | ( |  | ) | const

inline

Was an error found during construction from an input stream?

This routine returns `true` if an input stream constructor was used to create this object but the data in the input stream was invalid or incorrectly formatted.

If a different constructor was called (i.e., no input stream was used), then this routine will always return `false`.

Returns
  `true` if an error occurred during construction from an input stream, or `false` otherwise.

## permIndex() [1/4]

template<int dim>

int & regina::GluingPerms< dim >::permIndex | ( | const FacetSpec< dim > & | source | ) |

inline protected

Returns the index into array Perm<dim+1>::Sn_1 describing how the the given facet is joined to its partner.

Note that this permutation is not a gluing permutation as such, but rather a permutation of 0,...,dim-1 only. For a real facet gluing permutation, see routine gluingPerm().

Precondition
  The given facet is a real simplex facet (not boundary, before-the-start or past-the-end).

Parameters

  source | the simplex facet under investigation.

Returns
  a reference to the corresponding array index.

## permIndex() [2/4]

template<int dim>

int & regina::GluingPerms< dim >::permIndex | ( | unsigned | simp,
|  | unsigned | facet
| ) |  |

inline protected

Returns the index into array Perm<dim+1>::Sn_1 describing how the the given facet is joined to its partner.

Note that this permutation is not a gluing permutation as such, but rather a permutation of 0,...,dim-1 only. For a real facet gluing permutation, see routine gluingPerm().

Parameters

  simp | the simplex under investigation (this must be strictly less than the total number of simplices under consideration).
  facet | the facet of the given simplex under investigation (between 0 and dim inclusive).

Returns
  a reference to the corresponding array index.

## permIndex() [3/4]

template<int dim>

const int & regina::GluingPerms< dim >::permIndex | ( | const FacetSpec< dim > & | source | ) | const

inline protected

Returns the index into array Perm<dim+1>::Sn_1 describing how the the given facet is joined to its partner.

Note that this permutation is not a gluing permutation as such, but rather a permutation of 0,...,dim-1 only. For a real facet gluing permutation, see routine gluingPerm().

Precondition
  The given facet is a real simplex facet (not boundary, before-the-start or past-the-end).

Parameters

  source | the simplex facet under investigation.

Returns
  a reference to the corresponding array index.

## permIndex() [4/4]

template<int dim>

const int & regina::GluingPerms< dim >::permIndex | ( | unsigned | simp,
|  | unsigned | facet
| ) |  | const

inline protected

Returns the index into array Perm<dim+1>::Sn_1 describing how the the given facet is joined to its partner.

Note that this permutation is not a gluing permutation as such, but rather a permutation of 0,...,dim-1 only. For a real facet gluing permutation, see routine gluingPerm().

Parameters

  simp | the simplex under investigation (this must be strictly less than the total number of simplices under consideration).
  facet | the facet of the given simplex under investigation (between 0 and dim inclusive).

Returns
  a reference to the corresponding array index.

## size()

template<int dim>

unsigned regina::GluingPerms< dim >::size | ( |  | ) | const

inline

Returns the total number of simplices under consideration.

Returns
  the number of simplices under consideration.

## triangulate()

template<int dim>

Triangulation<dim>* regina::GluingPerms< dim >::triangulate | ( |  | ) | const

Returns a newly created triangulation as modelled by this set of gluing permutations and the associated simplex facet pairing.

Each matched pair of facets and their associated permutations will be realised as two simplex facets in the triangulation glued together with the corresponding gluing permutation. Each unmatched facet will be realised as a boundary facet in the triangulation.

It is the responsibility of the caller of this routine to delete this triangulation once it is no longer required.

Returns
  a newly created triangulation modelled by this structure.

## Member Data Documentation

## inputError_

template<int dim>

bool regina::GluingPerms< dim >::inputError_

protected

Has an error occurred during construction from an input stream?

## pairing_

template<int dim>

const FacetPairing<dim>* regina::GluingPerms< dim >::pairing_

protected

The facet pairing that this permutation set complements.

This is guaranteed to be the minimal representative of its facet pairing isomorphism class.

## permIndices_

template<int dim>

int* regina::GluingPerms< dim >::permIndices_

protected

The index into array Perm<dim+1>::Sn_1 describing how each simplex facet is glued to its partner.

Note that this is not a gluing permutation as such but rather a permutation of 0,...,dim-1 only (see the routines gluingToIndex() and indexToGluing() for conversions). If a permutation has not yet been selected (e.g., if this permutation set is still under construction) then this index is -1.

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

- census/gluingperms.h

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