Regina 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 CensusHitslookup (const Triangulation< 3 > &tri)
 Searches for the given triangulation through all of Regina's in-built census databases. More...
 
static CensusHitslookup (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.

Member Function Documentation

◆ lookup() [1/2]

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() [2/2]

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.

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

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