A utility class for searching through all possible gluing permutation sets that correspond to a given tetrahedron face pairing.
More...
|
| GluingPermSearcher (const FacetPairing< 3 > *pairing, const FacetPairing< 3 >::IsoList *autos, bool orientableOnly, bool finiteOnly, int whichPurge, GluingPermSearcher< 3 >::Use use, void *useArgs=0) |
| Initialises a new search for gluing permutation sets. More...
|
|
| GluingPermSearcher (std::istream &in, GluingPermSearcher< 3 >::Use use, void *useArgs=0) |
| Initialises a new search manager based on data read from the given input stream. More...
|
|
virtual | ~GluingPermSearcher () |
| Destroys this search manager and all supporting data structures. More...
|
|
virtual void | runSearch (long maxDepth=-1) |
| Generates all possible gluing permutation sets that satisfy the current search criteria. More...
|
|
bool | completePermSet () const |
| Determines whether this search manager holds a complete gluing permutation set or just a partially completed search state. More...
|
|
void | dumpTaggedData (std::ostream &out) const |
| Dumps all internal data in a plain text format, along with a marker to signify which precise class the data belongs to. More...
|
|
virtual void | dumpData (std::ostream &out) const override |
| Dumps all internal data in a plain text format to the given output stream. More...
|
|
| GluingPermSearcher (const GluingPermSearcher &)=delete |
|
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...
|
|
|
static void | findAllPerms (const FacetPairing< 3 > *pairing, const FacetPairing< 3 >::IsoList *autos, bool orientableOnly, bool finiteOnly, int whichPurge, GluingPermSearcher< 3 >::Use use, void *useArgs=0) |
| The main entry routine for running a search for all gluing permutation sets that complement a given face pairing. More...
|
|
static GluingPermSearcher< 3 > * | bestSearcher (const FacetPairing< 3 > *pairing, const FacetPairing< 3 >::IsoList *autos, bool orientableOnly, bool finiteOnly, int whichPurge, GluingPermSearcher< 3 >::Use use, void *useArgs=0) |
| Constructs a search manager of the best possible class for the given search parameters. More...
|
|
static GluingPermSearcher< 3 > * | readTaggedData (std::istream &in, GluingPermSearcher< 3 >::Use use, void *useArgs=0) |
| Creates a new search manager based on tagged data read from the given input stream. More...
|
|
|
bool | isCanonical () const |
| Compares the current set of gluing permutations with its preimage under each automorphism of the underlying face pairing, in order to see whether the current set is in canonical form (i.e., is lexicographically smallest). More...
|
|
bool | badEdgeLink (const FacetSpec< 3 > &face) const |
| Determines whether the permutations already constructed model a triangulation with an edge identified with itself in reverse. More...
|
|
bool | lowDegreeEdge (const FacetSpec< 3 > &face, bool testDegree12, bool testDegree3) const |
| Determines whether the permutations already constructed model a triangulation with a low degree edge. More...
|
|
virtual char | dataTag () const |
| Returns the character used to identify this class when storing tagged data in text format. 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...
|
|
|
const FacetPairing< 3 >::IsoList * | autos_ |
| The set of isomorphisms that define equivalence of gluing permutation sets. More...
|
|
bool | autosNew |
| Did we create the isomorphism list autos_ ourselves (in which case we must destroy it also)? More...
|
|
bool | orientableOnly_ |
| Are we only searching for gluing permutations that correspond to orientable triangulations? More...
|
|
bool | finiteOnly_ |
| Are we only searching for gluing permutations that correspond to finite triangulations? More...
|
|
int | whichPurge_ |
| Are there any types of triangulation that we may optionally avoid constructing? This should be a bitwise OR of constants from the PurgeFlags enumeration. More...
|
|
GluingPermSearcher< 3 >::Use | use_ |
| A routine to call each time a gluing permutation set is found during the search. More...
|
|
void * | useArgs_ |
| Additional user-supplied data to be passed as the second argument to the use_ routine. More...
|
|
bool | started |
| Has the search started yet? This helps distinguish between a new search and the resumption of a partially completed search. More...
|
|
int * | orientation |
| Keeps track of the orientation of each tetrahedron in the underlying triangulation. More...
|
|
FacetSpec< 3 > * | order |
| Describes the order in which gluing permutations are assigned to faces. More...
|
|
int | orderSize |
| The total number of edges in the face pairing graph, i.e., the number of elements of interest in the order[] array. More...
|
|
int | orderElt |
| Marks which element of order[] we are currently examining at this stage of the search. More...
|
|
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...
|
|
A utility class for searching through all possible gluing permutation sets that correspond to a given tetrahedron face pairing.
Subclasses of GluingPermSearcher<3> correspond to specialised (and heavily optimised) search algorithms that may be used in sufficiently constrained scenarios. The main class GluingPermSearcher<3> offers a default (but slower) search algorithm that may be used in more general contexts.
The simplest way of performing a search through all possible gluing permutations is by calling the static method findAllPerms(). This will examine the search parameters and ensure that the best possible algorithm is used. For finer control over the program flow, the static method bestSearcher() can be used to create a search manager of the most suitable class and then runSearch() can be called on this object directly. For absolute control, a specific algorithm can be forced by explicitly constructing an object of the corresponding class (and again calling runSearch() on that object directly).
Note that this class derives from GluingPerms<3>. The search will involve building and repeatedly modifying the inherited GluingPerms<3> data in-place.
- Python:\n Only the PurgeFlags enumeration from this class is
- present, and the PurgeFlags constants are also made directly available through the regina namespace. Therefore there is no need to explicitly access the class GluingPermSearcher<3> through Python.
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.
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.
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.