Regina Calculation Engine
Classes | Typedefs | Functions | Friends
Census of Triangulations

Census lookup and enumeration for triangulations of various dimensions. More...

Classes

class  regina::CensusDB
 Stores the location and description of one of Regina's in-built census databases. More...
 
class  regina::CensusHit
 Stores a single "hit" indicating that some given triangulation has been located in one of Regina's in-built census databases. More...
 
class  regina::CensusHits
 Stores a list of "hits" indicating all the places in which a given triangulation has been located in Regina's various in-built census databases. More...
 
class  regina::CensusHitIterator
 
A forward iterator that walks through all hits stored by a single CensusHits object. More...
 
class  regina::Census
 A utility class used to search for triangulations across one or more 3-manifold census databases. More...
 
struct  std::iterator_traits< regina::CensusHitIterator >
 
class  regina::GluingPerms< dim >
 
Represents a specific set of gluing permutations to complement a particular pairwise matching of simplex facets. More...
 
class  regina::GluingPermSearcher< dim >
 
A utility class used to build a census of triangulations, by searching through all possible sets of gluing permutations to match a given facet pairing. More...
 
class  regina::GluingPermSearcher< 2 >
 
A utility class for searching through all possible gluing permutation sets that correspond to a given triangle edge pairing. More...
 
class  regina::GluingPermSearcher< 3 >
 
A utility class for searching through all possible gluing permutation sets that correspond to a given tetrahedron face pairing. More...
 
class  regina::EulerSearcher
 
A gluing permutation search class that offers a specialised search algorithm for when all vertex links must all have a given fixed Euler characteristic. More...
 
class  regina::CompactSearcher
 
A gluing permutation search class that offers a specialised search algorithm for when only compact (finite) 3-manifold triangulations are required. More...
 
class  regina::ClosedPrimeMinSearcher
 
A gluing permutation search class that offers a specialised search algorithm for when (i) only closed prime minimal P2-irreducible triangulations are required, and (ii) the given face pairing has order at least three. More...
 
class  regina::HyperbolicMinSearcher
 
A gluing permutation search class that offers a specialised search algorithm for when only minimal ideal triangulations of cusped finite-volume hyperbolic 3-manifolds are required. More...
 
class  regina::GluingPermSearcher< 4 >
 
A utility class for searching through all possible gluing permutation sets that correspond to a given pentachoron facet pairing. More...
 

Typedefs

typedef CensusDB regina::NCensusDB
 Deprecated typedef for backward compatibility. More...
 
typedef CensusHit regina::NCensusHit
 Deprecated typedef for backward compatibility. More...
 
typedef CensusHits regina::NCensusHits
 Deprecated typedef for backward compatibility. More...
 
typedef Census regina::NCensus
 Deprecated typedef for backward compatibility. More...
 
typedef ptrdiff_t std::iterator_traits< regina::CensusHitIterator >::difference_type
 
typedef const regina::CensusHitstd::iterator_traits< regina::CensusHitIterator >::value_type
 
typedef regina::CensusHit const *const * std::iterator_traits< regina::CensusHitIterator >::pointer_type
 
typedef regina::CensusHit const *const & std::iterator_traits< regina::CensusHitIterator >::reference_type
 
typedef std::forward_iterator_tag std::iterator_traits< regina::CensusHitIterator >::iterator_category
 
template<int dim>
using regina::NGenericGluingPerms = GluingPerms< dim >
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPerms< 2 > regina::Dim2GluingPerms
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPerms< 3 > regina::NGluingPerms
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPerms< 4 > regina::Dim4GluingPerms
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPermSearcher< 2 > regina::Dim2GluingPermSearcher
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPermSearcher< 2 >::Use regina::UseDim2GluingPerms
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPermSearcher< 3 > regina::NGluingPermSearcher
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPermSearcher< 3 >::Use regina::UseGluingPerms
 Deprecated typedef for backward compatibility. More...
 
typedef EulerSearcher regina::NEulerSearcher
 Deprecated typedef for backward compatibility. More...
 
typedef CompactSearcher regina::NCompactSearcher
 Deprecated typedef for backward compatibility. More...
 
typedef ClosedPrimeMinSearcher regina::NClosedPrimeMinSearcher
 Deprecated typedef for backward compatibility. More...
 
typedef HyperbolicMinSearcher regina::NHyperbolicMinSearcher
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPermSearcher< 4 > regina::Dim4GluingPermSearcher
 Deprecated typedef for backward compatibility. More...
 
typedef GluingPermSearcher< 4 >::Use regina::UseDim4GluingPerms
 Deprecated typedef for backward compatibility. More...
 

Functions

 regina::CensusDB::CensusDB (const std::string &filename, const std::string &desc)
 Creates a new reference to one of Regina's census databases. More...
 
 regina::CensusDB::CensusDB (const CensusDB &)=default
 Creates a new clone of the given database reference. More...
 
 regina::CensusDB::CensusDB (CensusDB &&) noexcept=default
 Moves the given database reference into this new object. More...
 
const std::string & regina::CensusDB::filename () const
 Returns the filename where this database is stored. More...
 
const std::string & regina::CensusDB::desc () const
 Returns a human-readable description of this database. More...
 
bool regina::CensusDB::lookup (const std::string &isoSig, CensusHits *hits) const
 Searches for the given isomorphism signature in this database. More...
 
CensusDBregina::CensusDB::operator= (const CensusDB &)=default
 Sets this to be a clone of the given database reference. More...
 
CensusDBregina::CensusDB::operator= (CensusDB &&) noexcept=default
 Moves the given database reference into this object. More...
 
const std::string & regina::CensusHit::name () const
 Returns the human-readable name associated with the triangulation in the database. More...
 
const CensusDBregina::CensusHit::db () const
 Returns details of the census database in which the triangulation was found. More...
 
const CensusHitregina::CensusHit::next () const
 Returns the next hit for the same triangulation, or null if there are no more hits. More...
 
 regina::CensusHit::CensusHit (const CensusHit &)=delete
 
CensusHitregina::CensusHit::operator= (const CensusHit &)=delete
 
 regina::CensusHits::CensusHits ()
 Constructs an empty set of hits. More...
 
 regina::CensusHits::~CensusHits ()
 Destroys this object and all of the individual CensusHit objects that it contains. More...
 
const CensusHitregina::CensusHits::first () const
 Returns the first hit in this list. More...
 
size_t regina::CensusHits::count () const
 Returns the total number of hits in this list. More...
 
bool regina::CensusHits::empty () const
 Returns whether there are any hits at all. More...
 
CensusHitIterator regina::CensusHits::begin () const
 Returns an iterator at the beginning of this list of hits. More...
 
CensusHitIterator regina::CensusHits::end () const
 Returns an iterator beyond the end of this list of hits. More...
 
void regina::CensusHits::append (CensusHit *hit)
 
Appends a new hit to the end of this list. More...
 
 regina::CensusHits::CensusHits (const CensusHits &)=delete
 
CensusHitsregina::CensusHits::operator= (const CensusHits &)=delete
 
 regina::CensusHitIterator::CensusHitIterator ()
 Creates a past-the-end iterator. More...
 
 regina::CensusHitIterator::CensusHitIterator (const CensusHitIterator &)=default
 Default copy constructor. More...
 
 regina::CensusHitIterator::CensusHitIterator (const CensusHit *current)
 Creates a new iterator pointing to the given census hit. More...
 
CensusHitIteratorregina::CensusHitIterator::operator= (const CensusHitIterator &)=default
 Default copy assignment operator. More...
 
bool regina::CensusHitIterator::operator== (const CensusHitIterator &rhs) const
 Tests whether this and the given iterator are equal. More...
 
bool regina::CensusHitIterator::operator!= (const CensusHitIterator &rhs) const
 Tests whether this and the given iterator are different. More...
 
CensusHitIteratorregina::CensusHitIterator::operator++ ()
 
Preincrement operator. More...
 
CensusHitIterator regina::CensusHitIterator::operator++ (int)
 
Postincrement operator. More...
 
const CensusHitregina::CensusHitIterator::operator* () const
 
Returns the census hit that this iterator is currently pointing to, or null if this iterator is past-the-end. More...
 
static CensusHitsregina::Census::lookup (const Triangulation< 3 > &tri)
 Searches for the given triangulation through all of Regina's in-built census databases. More...
 
static CensusHitsregina::Census::lookup (const std::string &isoSig)
 Searches for the given triangulation through all of Regina's in-built census databases. More...
 

Friends

class regina::CensusHit::CensusDB
 
class regina::CensusHit::CensusHits
 

Detailed Description

Census lookup and enumeration for triangulations of various dimensions.

Typedef Documentation

◆ Dim2GluingPerms

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef Dim2GluingPerms, you should use the full class name GluingPerms<2>.

◆ Dim2GluingPermSearcher

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef Dim2GluingPermSearcher, you should use the full class name GluingPermSearcher<2>.

◆ Dim4GluingPerms

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef Dim4GluingPerms, you should use the full class name GluingPerms<4>.

◆ Dim4GluingPermSearcher

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef Dim4GluingPermSearcher, you should use the full class name GluingPermSearcher<4>.

◆ NCensus

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NCensus has now been renamed to Census.

◆ NCensusDB

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NCensusDB has now been renamed to CensusDB.

◆ NCensusHit

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NCensusHit has now been renamed to CensusHit.

◆ NCensusHits

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NCensusHits has now been renamed to CensusHits.

◆ NClosedPrimeMinSearcher

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NClosedPrimeMinSearcher has now been renamed to ClosedPrimeMinSearcher.

◆ NCompactSearcher

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NCompactSearcher has now been renamed to CompactSearcher.

◆ NEulerSearcher

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NEulerSearcher has now been renamed to EulerSearcher.

◆ NGenericGluingPerms

template<int dim>
using regina::NGenericGluingPerms = typedef GluingPerms<dim>

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old type alias NGenericGluingPerms<dim>, you should use the new class name GluingPerms<dim>.

◆ NGluingPerms

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef NGluingPerms, you should use the full class name GluingPerms<3>.

◆ NGluingPermSearcher

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef NGluingPermSearcher, you should use the full class name GluingPermSearcher<3>.

◆ NHyperbolicMinSearcher

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NHyperbolicMinSearcher has now been renamed to HyperbolicMinSearcher.

◆ UseDim2GluingPerms

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef UseDim2GluingPerms, you should use the new type name GluingPermSearcher<2>::Use.

◆ UseDim4GluingPerms

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef UseDim4GluingPerms, you should use the new type name GluingPermSearcher<4>::Use.

◆ UseGluingPerms

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
Instead of the old typedef UseGluingPerms, you should use the new type name GluingPermSearcher<3>::Use.

Function Documentation

◆ append()

void regina::CensusHits::append ( CensusHit hit)
inline


Appends a new hit to the end of this list.

This list will take ownership of the given object.

This operation does not invalidate any CensusHitIterator iterators.

Python
Not present.
Parameters
hitthe hit to append to this list.

◆ begin()

CensusHitIterator regina::CensusHits::begin ( ) const
inline

Returns an iterator at the beginning of this list of hits.

The begin() and end() routines allow you to iterate through all hits in this list using C++11 range-based for loops:

for (const CensusHit* h : *hits) { ... }

In Python, a CensusHits object can be treated as an iterable object:

hits = Census.lookup(...)
for h in hits:
...
Returns
an iterator at the beginning of this list of hits.

◆ CensusDB() [1/3]

regina::CensusDB::CensusDB ( const std::string &  filename,
const std::string &  desc 
)
inline

Creates a new reference to one of Regina's census databases.

This constructor will not run any checks (e.g., it will not verify that the database exists, or that it is stored in the correct format). Note that even if the database does not exist, the lookup() routine will fail gracefully.

Parameters
filenamethe filename where the database is stored.
desca human-readable description of the database. See the desc() routine for further information on how this description might be used.

◆ CensusDB() [2/3]

regina::CensusDB::CensusDB ( const CensusDB )
default

Creates a new clone of the given database reference.

◆ CensusDB() [3/3]

regina::CensusDB::CensusDB ( CensusDB &&  )
defaultnoexcept

Moves the given database reference into this new object.

The reference that was passed will no longer be usable.

◆ CensusHitIterator() [1/3]

regina::CensusHitIterator::CensusHitIterator ( )
inline

Creates a past-the-end iterator.

◆ CensusHitIterator() [2/3]

regina::CensusHitIterator::CensusHitIterator ( const CensusHitIterator )
default

Default copy constructor.

◆ CensusHitIterator() [3/3]

regina::CensusHitIterator::CensusHitIterator ( const CensusHit current)
inline

Creates a new iterator pointing to the given census hit.

Parameters
currentthe census hit that the new iterator should point to, or null if the new iterator should be past-the-end.

◆ CensusHits()

regina::CensusHits::CensusHits ( )
inline

Constructs an empty set of hits.

◆ count()

size_t regina::CensusHits::count ( ) const
inline

Returns the total number of hits in this list.

This routine is fast, since the number of hits is cached (it does not need to walk through the entire list to count).

Returns
the total number of hits.

◆ db()

const CensusDB * regina::CensusHit::db ( ) const
inline

Returns details of the census database in which the triangulation was found.

Returns
the database for this hit.

◆ desc()

const std::string & regina::CensusDB::desc ( ) const
inline

Returns a human-readable description of this database.

The description could (for instance) be shown to users when giving a list of all available databases, or when identifying in which particular database a match was found.

Returns
the database description.

◆ empty()

bool regina::CensusHits::empty ( ) const
inline

Returns whether there are any hits at all.

Returns
true if this list is empty (i.e., there are no hits), or false if the list is non-empty (i.e., there are one or more hits).

◆ end()

CensusHitIterator regina::CensusHits::end ( ) const
inline

Returns an iterator beyond the end of this list of hits.

In C++, the begin() and end() routines allow you to iterate through an entire list of census hits using C++11 range-based for loops. In Python, a CensusHits object can be treated as an iterable object.

See the begin() documentation for further details.

Returns
an iterator beyond the end of this list of hits.

◆ filename()

const std::string & regina::CensusDB::filename ( ) const
inline

Returns the filename where this database is stored.

Returns
the database filename.

◆ first()

const CensusHit * regina::CensusHits::first ( ) const
inline

Returns the first hit in this list.

To continue iterating, you can call CensusHit::next() upon each individual hit to retrieve the next hit in the list.

Returns
the first hit, or null if there are no hits at all.

◆ lookup() [1/3]

bool regina::CensusDB::lookup ( const std::string &  isoSig,
CensusHits hits 
) const

Searches for the given isomorphism signature in this database.

All matches (if any) will be appended to the given list of hits.

Note that the database will be opened and closed every time this routine is called.

Parameters
isoSigthe isomorphism signature to search for.
hitsthe list of hits to which all matches will be appended.
Returns
true if the lookup was correctly performed, or false if some error occurred (e.g., the database could not be opened). Note in particular that if there were no matches but no errors, then the return value will be true.

◆ lookup() [2/3]

static CensusHits* regina::Census::lookup ( const Triangulation< 3 > &  tri)
static

Searches for the given triangulation through all of Regina's in-built census databases.

Internally, the census databases store isomorphism signatures as opposed to fully fleshed-out triangulations. If you already have the isomorphism signature of the triangulation, then you can call the variant lookup(const std::string&) instead, which will be faster since it avoids some extra overhead.

Note that there may be many hits (possibly from multiple databases, and in some cases possibly even within the same database). The list of hits will be returned as a CensusHits object, which you can use to iterate through the individual matches. Even if there are no matches at all, a CensusHits object will still be returned; you can call CensusHits::empty() to test whether any matches were found.

The CensusHits object that is returned will be newly allocated, and it is the caller's responsibility to destroy it.

This routine is fast: it first computes the isomorphism signature of the triangulation, and then performs a logarithmic-time lookup in each database (here "logarithmic" means logarithmic in the size of the database).

Parameters
trithe triangulation that you wish to search for.
Returns
a newly created list of all database matches.

◆ lookup() [3/3]

static CensusHits* regina::Census::lookup ( const std::string &  isoSig)
static

Searches for the given triangulation through all of Regina's in-built census databases.

For this routine you specify the triangulation by giving its isomorphism signature, as returned by Triangulation<3>::isoSig(). This is faster than the variant lookup(const Triangulation<3>&), since Regina's census databases store isomorphism signatures internally. If you do not already know the isomorphism signature, it is fine to just call lookup(const Triangulation<3>&) instead.

Note that there may be many hits (possibly from multiple databases, and in some cases possibly even within the same database). The list of hits will be returned as a CensusHits object, which you can use to iterate through the individual matches. Even if there are no matches at all, a CensusHits object will still be returned; you can call CensusHits::empty() to test whether any matches were found.

The CensusHits object that is returned will be newly allocated, and it is the caller's responsibility to destroy it.

This routine is fast: it first computes the isomorphism signature of the triangulation, and then performs a logarithmic-time lookup in each database (here "logarithmic" means logarithmic in the size of the database).

Parameters
isoSigthe isomorphism signature of the triangulation that you wish to search for.
Returns
a newly created list of all database matches.

◆ name()

const std::string & regina::CensusHit::name ( ) const
inline

Returns the human-readable name associated with the triangulation in the database.

This typically contains the name of the triangulation and/or the name of the underlying manifold.

Returns
the human-readable name for this hit.

◆ next()

const CensusHit * regina::CensusHit::next ( ) const
inline

Returns the next hit for the same triangulation, or null if there are no more hits.

Recall that hits are typically returned using the CensusHits class, which stores a list of individual CensusHit objects. To iterate through this list, you should begin by calling CensusHits::first() to retrieve the first hit, and then for each hit call CensusHit::next() (this function) to retrieve the next hit.

Returns
the next hit after this in the list, or null if this is the last hit.

◆ operator!=()

bool regina::CensusHitIterator::operator!= ( const CensusHitIterator rhs) const
inline

Tests whether this and the given iterator are different.

Returns
true if and only if the two iterators are different.

◆ operator*()

const CensusHit * regina::CensusHitIterator::operator* ( ) const
inline


Returns the census hit that this iterator is currently pointing to, or null if this iterator is past-the-end.

Python
Not present; instead this class implements next(), which either returns the current census hit and increments the iterator, or else throws a StopIteration exception if the iterator is past-the-end.
Returns
the current census hit, or null if this iterator is past-the-end.

◆ operator++() [1/2]

CensusHitIterator & regina::CensusHitIterator::operator++ ( )
inline


Preincrement operator.

This moves the iterator to point to the next hit for the same triangulation in the census databases, as defined by CensusHit::next().

Python
Not present; instead this class implements next(), which either returns the current census hit and increments the iterator, or else throws a StopIteration exception if the iterator is past-the-end.
Returns
a reference to this iterator.

◆ operator++() [2/2]

CensusHitIterator regina::CensusHitIterator::operator++ ( int  )
inline


Postincrement operator.

This moves the iterator to point to the next hit for the same triangulation in the census databases, as defined by CensusHit::next().

Python
Not present; instead this class implements next(), which either returns the current census hit and increments the iterator, or else throws a StopIteration exception if the iterator is past-the-end.
Returns
a a copy of this iterator before it was incremented.

◆ operator=() [1/3]

CensusDB& regina::CensusDB::operator= ( const CensusDB )
default

Sets this to be a clone of the given database reference.

◆ operator=() [2/3]

CensusDB& regina::CensusDB::operator= ( CensusDB &&  )
defaultnoexcept

Moves the given database reference into this object.

The reference that was passed will no longer be usable.

◆ operator=() [3/3]

CensusHitIterator& regina::CensusHitIterator::operator= ( const CensusHitIterator )
default

Default copy assignment operator.

◆ operator==()

bool regina::CensusHitIterator::operator== ( const CensusHitIterator rhs) const
inline

Tests whether this and the given iterator are equal.

Returns
true if and only if the two iterators are equal.

◆ ~CensusHits()

regina::CensusHits::~CensusHits ( )
inline

Destroys this object and all of the individual CensusHit objects that it contains.


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