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

A utility class used to search for triangulations across one or more 2-manifold census databases. More...

#include <census/dim2census.h>

Public Types

typedef bool(* AcceptTriangulation )(Dim2Triangulation *, void *)
 A routine used to determine whether a particular 2-manifold triangulation should be included in a census. More...
 

Static Public Member Functions

static unsigned long formCensus (NPacket *parent, unsigned nTriangles, NBoolSet orientability, NBoolSet boundary, int nBdryEdges, AcceptTriangulation sieve=0, void *sieveArgs=0)
 Deprecated routine that fills the given packet with all triangulations in a census of 2-manifold triangulations satisfying the given constraints. More...
 
static unsigned long formPartialCensus (const Dim2EdgePairing *pairing, NPacket *parent, NBoolSet orientability, AcceptTriangulation sieve=0, void *sieveArgs=0)
 Deprecated routine that fills the given packet with all triangulations in a partial census of 2-manifold triangulations satisfying the given constraints. More...
 

Detailed Description

A utility class used to search for triangulations across one or more 2-manifold census databases.

Member Typedef Documentation

typedef bool(* regina::Dim2Census::AcceptTriangulation)(Dim2Triangulation *, void *)

A routine used to determine whether a particular 2-manifold triangulation should be included in a census.

Routines of this type are used by Dim2Census::formCensus().

The first parameter passed should be a triangulation currently under consideration. The second parameter may contain arbitrary data as passed to Dim2Census::formCensus().

The return value should be true if the triangulation passed should be included in the census, or false otherwise.

Deprecated:
The Dim2Census enumeration facilities are on their way out of Regina, and in the future the Dim2Census class will be used purely for census lookups. If you wish to build a census yourself, you should call Dim2EdgePairing::findAllPairings() and Dim2GluingPermSearcher::findAllPerms() directly.

Member Function Documentation

static unsigned long regina::Dim2Census::formCensus ( NPacket parent,
unsigned  nTriangles,
NBoolSet  orientability,
NBoolSet  boundary,
int  nBdryEdges,
AcceptTriangulation  sieve = 0,
void *  sieveArgs = 0 
)
static

Deprecated routine that fills the given packet with all triangulations in a census of 2-manifold triangulations satisfying the given constraints.

Each triangulation in the census will appear as a child of the given packet.

This routine will conduct a census of all valid triangulations containing a given number of triangles. All such triangulations are included in the census up to combinatorial isomorphism; given any isomorphism class, exactly one representative will appear in the census.

The census can be optionally restricted to only include triangulations satisfying further constraints (such as orientability); see the individual parameter descriptions for further details. In particular, parameter sieve can be used to impose arbitrary restrictions that are not hard-coded into this class.

Note that if constraints may be imposed using the hard-coded parameters (such as orientability), it is generally better to do this than to use the arbitrary constraint parameter sieve. Hard-coded parameters will be tested earlier, and some (such as orientability) can be incorporated directly into the census algorithm to give a vast performance increase.

Note that this routine should only be used if the census contains a small enough total number of triangulations to avoid any memory disasters.

Deprecated:
The Dim2Census enumeration facilities are on their way out of Regina, and in the future the Dim2Census class will be used purely for census lookups. To perform the kind of enumeration that is described here, you should call Dim2EdgePairing::findAllPairings() and Dim2GluingPermSearcher::findAllPerms() directly.
Python:
Parameters sieve and sieveArgs are not present (and will be treated as 0).
Parameters
parentthe packet beneath which members of the census will be placed.
nTrianglesthe number of triangles in each triangulation in the census.
orientabilitydetermines whether to include orientable and/or non-orientable triangulations. The set should contain true if orientable triangulations are to be included, and should contain false if non-orientable triangulations are to be included.
boundarydetermines whether to include triangulations with and/or without boundary edges. The set should contain true if triangulations with boundary edges are to be included, and should contain false if triangulations with only internal edges are to be included.
nBdryEdgesspecifies the precise number of boundary edges that should be present in the triangulations produced. If this parameter is negative, it is ignored and no additional restriction is imposed. See the documentation for routine Dim2EdgePairing::findAllPairings() for details regarding this parameter and how it interacts with parameter boundary.
sievean additional constraint function that may be used to exclude certain triangulations from the census. If this parameter is non-zero, each triangulation produced (after passing all other criteria) will be passed through this function. If this function returns true then the triangulation will be included in the census; otherwise it will not. When this function is called, the first (triangulation) argument will be a triangulation under consideration for inclusion in the census. The second argument will be parameter sieveArgs as passed to formCensus(). Parameter sieve may be passed as null (in which case no additional constraint function will be used).
sieveArgsthe pointer to pass as the final parameter for the function sieve which will be called upon each triangulation found. If sieve is null then sieveArgs will be ignored.
Returns
the number of triangulations produced in the census.
static unsigned long regina::Dim2Census::formPartialCensus ( const Dim2EdgePairing pairing,
NPacket parent,
NBoolSet  orientability,
AcceptTriangulation  sieve = 0,
void *  sieveArgs = 0 
)
static

Deprecated routine that fills the given packet with all triangulations in a partial census of 2-manifold triangulations satisfying the given constraints.

Each triangulation in the partial census will appear as a child of the given packet.

This routine will conduct a census of all valid 2-manifold triangulations that are modelled by the given triangle edge pairing. All such triangulations are included in the census up to combinatorial isomorphism; given any isomorphism class, exactly one representative will appear in the census.

The census can be optionally restricted to only include triangulations satisfying further constraints (such as orientability); see the individual parameter descriptions for further details. In particular, parameter sieve can be used to impose arbitrary restrictions that are not hard-coded into this class.

Note that if constraints may be imposed using the hard-coded parameters (such as orientability), it is generally better to do this than to use the arbitrary constraint parameter sieve. Hard-coded parameters will be tested earlier, and some (such as orientability) can be incorporated directly into the census algorithm to give a vast performance increase.

Note that this routine should only be used if the partial census contains a small enough total number of triangulations to avoid any memory disasters.

The partial census will run in the current thread. This routine will only return once the partial census is complete.

Deprecated:
The Dim2Census enumeration facilities are on their way out of Regina, and in the future the Dim2Census class will be used purely for census lookups (if at all). To perform the kind of enumeration that is described here, you should call Dim2GluingPermSearcher::findAllPerms() directly.
Precondition
The given edge pairing is connected, i.e., it is possible to reach any triangle from any other triangle via a series of matched edge pairs.
The given edge pairing is in canonical form as described by Dim2EdgePairing::isCanonical(). Note that all facet pairings constructed by Dim2EdgePairing::findAllPairings() are of this form.
Python:
Parameters sieve and sieveArgs are not present (and will be treated as 0).
Parameters
pairingthe edge pairing that triangulations in this partial census must be modelled by.
parentthe packet beneath which members of the partial census will be placed.
orientabilitydetermines whether to include orientable and/or non-orientable triangulations. The set should contain true if orientable triangulations are to be included, and should contain false if non-orientable triangulations are to be included.
sievean additional constraint function that may be used to exclude certain triangulations from the census. If this parameter is non-zero, each triangulation produced (after passing all other criteria) will be passed through this function. If this function returns true then the triangulation will be included in the census; otherwise it will not. When this function is called, the first (triangulation) argument will be a triangulation under consideration for inclusion in the census. The second argument will be parameter sieveArgs as passed to formPartialCensus(). Parameter sieve may be passed as null (in which case no additional constraint function will be used).
sieveArgsthe pointer to pass as the final parameter for the function sieve which will be called upon each triangulation found. If sieve is null then sieveArgs will be ignored.
Returns
the number of triangulations produced in the partial census.

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