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

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

#include <census/census.h>

Static Public Member Functions

static std::list< CensusHitlookup (const Triangulation< 3 > &tri)
 Searches for the given triangulation through all of Regina's in-built census databases. More...
 
static std::list< CensusHitlookup (const std::string &isoSig)
 Searches for the given triangulation through all of Regina's in-built census databases. More...
 

Detailed Description

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

This class consists of static routines only. The main entry point (and typically the only way that you would use this class) is via the various static lookup() routines.

Warning
This class is not thread-safe, in that it performs some global initialisation the first time one of the lookup() functions is called. If you need thread-safety, you can always call lookup() with an empty string when initialising your program, and ensure this has finished before you allow any subsequent "normal" calls to lookup() from other threads.

Member Function Documentation

◆ lookup() [1/2]

static std::list< CensusHit > 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). Therefore a list of hits will be returned, which you can iterate through the individual matches. Even if there are no matches at all, a list will still be returned; you can call empty() on this list to test whether any matches were found.

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 list of all database matches.

◆ lookup() [2/2]

static std::list< CensusHit > 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). Therefore a list of hits will be returned, which you can iterate through the individual matches. Even if there are no matches at all, a list will still be returned; you can call empty() on this list to test whether any matches were found.

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 list of all database matches.

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

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