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

Represents a general lens space. More...

#include <manifold/lensspace.h>

Inheritance diagram for regina::LensSpace:
regina::Manifold regina::Output< Manifold >

Public Member Functions

 LensSpace (unsigned long newP, unsigned long newQ)
 Creates a new lens space with the given parameters. More...
 
 LensSpace (const LensSpace &)=default
 Creates a new copy of the given lens space. More...
 
unsigned long p () const
 Returns the first parameter p of this lens space L(p,q). More...
 
unsigned long q () const
 Returns the second parameter q of this lens space L(p,q). More...
 
bool operator== (const LensSpace &compare) const
 Determines whether this and the given lens space have the same presentation. More...
 
bool operator!= (const LensSpace &compare) const
 Determines whether this and the given lens space have different presentations. More...
 
LensSpaceoperator= (const LensSpace &)=default
 Sets this to be a copy of the given lens space. More...
 
void swap (LensSpace &other) noexcept
 Swaps the contents of this and the given lens space. More...
 
Triangulation< 3 > construct () const override
 Returns a triangulation of this 3-manifold, if such a construction has been implemented. More...
 
AbelianGroup homology () const override
 Returns the first homology group of this 3-manifold, if such a routine has been implemented. More...
 
bool isHyperbolic () const override
 Returns whether or not this is a finite-volume hyperbolic manifold. More...
 
std::ostream & writeName (std::ostream &out) const override
 Writes the common name of this 3-manifold as a human-readable string to the given output stream. More...
 
std::ostream & writeTeXName (std::ostream &out) const override
 Writes the common name of this 3-manifold in TeX format to the given output stream. More...
 
std::string name () const
 Returns the common name of this 3-manifold as a human-readable string. More...
 
std::string texName () const
 Returns the common name of this 3-manifold in TeX format. More...
 
std::string TeXName () const
 Deprecated routine that returns the common name of this 3-manifold in TeX format. More...
 
std::string structure () const
 Returns details of the structure of this 3-manifold that might not be evident from its common name. More...
 
AbelianGroup homologyH1 () const
 A deprecated alias for homology(). More...
 
bool operator< (const Manifold &compare) const
 Determines in a fairly ad-hoc fashion whether this representation of this 3-manifold is "smaller" than the given representation of the given 3-manifold. More...
 
virtual std::ostream & writeStructure (std::ostream &out) const
 Writes details of the structure of this 3-manifold that might not be evident from its common name to the given output stream. More...
 
void writeTextShort (std::ostream &out) const
 Writes a short text representation of this object to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 Writes a detailed text representation of this object to the given output stream. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 

Detailed Description

Represents a general lens space.

The lens space L(p,q) is the 3-manifold you get by p/q Dehn surgery on the unknot. For instance, L(1,0) and L(1,1) are the 3-sphere, L(0,1) is the product S^1 x S^2, and L(p,1) is the circle bundle over S^2 with Euler class p. In L(p,q) if you take a generator g of H_1 and evaluate the torsion linking form on it, then <g,g> = [+/- r^2 q/p] in Q/Z where r is an integer.

All optional Manifold routines are implemented for this class.

This class supports copying but does not implement separate move operations, since its internal data is so small that copying is just as efficient. It implements the C++ Swappable requirement via its own member and global swap() functions, for consistency with the other manifold classes.

Constructor & Destructor Documentation

◆ LensSpace() [1/2]

regina::LensSpace::LensSpace ( unsigned long  newP,
unsigned long  newQ 
)
inline

Creates a new lens space with the given parameters.

See the class notes for details.

Precondition
The two given parameters are coprime (have a gcd of 1).
Parameters
newPthe first parameter p of the lens space L(p,q).
newQthe second parameter q of the lens space L(p,q). Note that there are no range restrictions whatsoever on this parameter.

◆ LensSpace() [2/2]

regina::LensSpace::LensSpace ( const LensSpace )
default

Creates a new copy of the given lens space.

Member Function Documentation

◆ construct()

Triangulation< 3 > regina::LensSpace::construct ( ) const
overridevirtual

Returns a triangulation of this 3-manifold, if such a construction has been implemented.

For details of which types of 3-manifolds have implemented this routine, see the class notes for each corresponding subclasses of Manifold.

The default implemention of this routine just throws a NotImplemented exception.

Exceptions
NotImplementedexplicit construction has not yet been implemented for this particular 3-manifold.
FileErrorthe construction needs to be read from file (as opposed to computed on the fly), but the file is inaccessible or its contents cannot be read and parsed correctly. Currently this can only happen for the subclass SnapPeaCensusManifold, which reads its triangulations from the SnapPea census databases that are installed with Regina.
Returns
a triangulation of this 3-manifold, if this construction has been implemented.

Reimplemented from regina::Manifold.

◆ detail()

std::string regina::Output< Manifold , false >::detail ( ) const
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ homology()

AbelianGroup regina::LensSpace::homology ( ) const
overridevirtual

Returns the first homology group of this 3-manifold, if such a routine has been implemented.

For details of which types of 3-manifolds have implemented this routine, see the class notes for each corresponding subclasses of Manifold.

The default implemention of this routine just throws a NotImplemented exception.

This routine can also be accessed via the alias homologyH1() (a name that is more specific, but a little longer to type).

Exceptions
NotImplementedhomology calculation has not yet been implemented for this particular 3-manifold.
FileErrorthe homology needs to be read from file (as opposed to computed), but the file is inaccessible or its contents cannot be read and parsed correctly. Currently this can only happen for the subclass SnapPeaCensusManifold, which reads its results from the SnapPea census databases that are installed with Regina.
Returns
the first homology group of this 3-manifold, if this functionality has been implemented.

Reimplemented from regina::Manifold.

◆ homologyH1()

AbelianGroup regina::Manifold::homologyH1 ( ) const
inlineinherited

A deprecated alias for homology().

Deprecated:
This routine can be accessed by the simpler name homology().
Exceptions
NotImplementedhomology calculation has not yet been implemented for this particular 3-manifold.
thehomology needs to be read from file (as opposed to computed), but the file is inaccessible or its contents cannot be read and parsed correctly. Currently this can only happen for the subclass SnapPeaCensusManifold, which reads its results from the SnapPea census databases that are installed with Regina.
Returns
the first homology group of this 3-manifold, if this functionality has been implemented.

◆ isHyperbolic()

bool regina::LensSpace::isHyperbolic ( ) const
inlineoverridevirtual

Returns whether or not this is a finite-volume hyperbolic manifold.

Returns
true if this is a finite-volume hyperbolic manifold, or false if not.

Implements regina::Manifold.

◆ name()

std::string regina::Manifold::name ( ) const
inherited

Returns the common name of this 3-manifold as a human-readable string.

Returns
the common name of this 3-manifold.

◆ operator!=()

bool regina::LensSpace::operator!= ( const LensSpace compare) const
inline

Determines whether this and the given lens space have different presentations.

Since the presentation is made canonical by the class constructor, this routine also identifies whether this and the given lens space are homeomorphic as 3-manifolds. This is in contrast to the comparison operators for other manifold classes (such as Seifert fibred spaces and graph manifolds), where the same manifold could have different presentations that compare as not equal.

Parameters
comparethe lens space with which this should be compared.
Returns
true if and only if this and the given lens space have different presentations (i.e., are non-homeomorphic).

◆ operator<()

bool regina::Manifold::operator< ( const Manifold compare) const
inherited

Determines in a fairly ad-hoc fashion whether this representation of this 3-manifold is "smaller" than the given representation of the given 3-manifold.

The ordering imposed on 3-manifolds is purely aesthetic on the part of the author, and is subject to change in future versions of Regina.

The ordering also depends on the particular representation of the 3-manifold that is used. As an example, different representations of the same Seifert fibred space might well be ordered differently.

All that this routine really offers is a well-defined way of ordering 3-manifold representations.

Warning
Currently this routine is only implemented in full for closed 3-manifolds. For most classes of bounded 3-manifolds, this routine simply compares the strings returned by name().
Parameters
comparethe 3-manifold representation with which this will be compared.
Returns
true if and only if this is "smaller" than the given 3-manifold representation.

◆ operator=()

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

Sets this to be a copy of the given lens space.

Returns
a reference to this lens space.

◆ operator==()

bool regina::LensSpace::operator== ( const LensSpace compare) const
inline

Determines whether this and the given lens space have the same presentation.

Since the presentation is made canonical by the class constructor, this routine also identifies whether this and the given lens space are homeomorphic as 3-manifolds. This is in contrast to the comparison operators for other manifold classes (such as Seifert fibred spaces and graph manifolds), where the same manifold could have different presentations that compare as not equal.

Parameters
comparethe lens space with which this should be compared.
Returns
true if and only if this and the given lens space have the same presentation (i.e., are homeomorphic).

◆ p()

unsigned long regina::LensSpace::p ( ) const
inline

Returns the first parameter p of this lens space L(p,q).

See the class notes for details.

Returns
the first parameter.

◆ q()

unsigned long regina::LensSpace::q ( ) const
inline

Returns the second parameter q of this lens space L(p,q).

See the class notes for details.

The value of q returned will be the smallest q between 0 and p-1 inclusive that produces the same 3-manifold as this lens space. This means it might not be the value of q that was used to initialise this lens space.

◆ str()

std::string regina::Output< Manifold , false >::str ( ) const
inherited

Returns a short text representation of this object.

This text should be human-readable, should use plain ASCII characters where possible, and should not contain any newlines.

Within these limits, this short text ouptut should be as information-rich as possible, since in most cases this forms the basis for the Python str() and repr() functions.

Python
The Python "stringification" function str() will use precisely this function, and for most classes the Python repr() function will incorporate this into its output.
Returns
a short text representation of this object.

◆ structure()

std::string regina::Manifold::structure ( ) const
inherited

Returns details of the structure of this 3-manifold that might not be evident from its common name.

For instance, for an orbit space S^3/G this routine might return the full Seifert structure.

This routine may return the empty string if no additional details are deemed necessary.

Returns
a string describing additional structural details.

◆ swap()

void regina::LensSpace::swap ( LensSpace other)
inlinenoexcept

Swaps the contents of this and the given lens space.

Parameters
otherthe lens space whose contents should be swapped with this.

◆ texName()

std::string regina::Manifold::texName ( ) const
inherited

Returns the common name of this 3-manifold in TeX format.

No leading or trailing dollar signs will be included.

Warning
The behaviour of this routine has changed as of Regina 4.3; in earlier versions, leading and trailing dollar signs were provided.
Returns
the common name of this 3-manifold in TeX format.

◆ TeXName()

std::string regina::Manifold::TeXName ( ) const
inlineinherited

Deprecated routine that returns the common name of this 3-manifold in TeX format.

Deprecated:
This routine has been renamed to texName().
Returns
the common name of this 3-manifold in TeX format.

◆ utf8()

std::string regina::Output< Manifold , false >::utf8 ( ) const
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should not contain any newlines, and (within these constraints) should be as information-rich as is reasonable.

Unlike str(), this function may use unicode characters to make the output more pleasant to read. The string that is returned will be encoded in UTF-8.

Returns
a short text representation of this object.

◆ writeName()

std::ostream & regina::LensSpace::writeName ( std::ostream &  out) const
overridevirtual

Writes the common name of this 3-manifold as a human-readable string to the given output stream.

Python
Not present; instead use the variant name() that takes no arguments and returns a string.
Parameters
outthe output stream to which to write.
Returns
a reference to the given output stream.

Implements regina::Manifold.

◆ writeStructure()

std::ostream & regina::Manifold::writeStructure ( std::ostream &  out) const
inlinevirtualinherited

Writes details of the structure of this 3-manifold that might not be evident from its common name to the given output stream.

For instance, for an orbit space S^3/G this routine might write the full Seifert structure.

This routine may write nothing if no additional details are deemed necessary. The default implementation of this routine behaves in this way.

Python
Not present; instead use the variant structure() that takes no arguments and returns a string.
Parameters
outthe output stream to which to write.
Returns
a reference to the given output stream.

Reimplemented in regina::SFSpace, and regina::SnapPeaCensusManifold.

◆ writeTeXName()

std::ostream & regina::LensSpace::writeTeXName ( std::ostream &  out) const
overridevirtual

Writes the common name of this 3-manifold in TeX format to the given output stream.

No leading or trailing dollar signs will be included.

Warning
The behaviour of this routine has changed as of Regina 4.3; in earlier versions, leading and trailing dollar signs were provided.
Python
Not present; instead use the variant texName() that takes no arguments and returns a string.
Parameters
outthe output stream to which to write.
Returns
a reference to the given output stream.

Implements regina::Manifold.

◆ writeTextLong()

void regina::Manifold::writeTextLong ( std::ostream &  out) const
inlineinherited

Writes a detailed text representation of this object to the given output stream.

Subclasses must not override this routine. They should override writeName() and writeStructure() instead.

Python
Not present; use detail() instead.
Parameters
outthe output stream to which to write.

◆ writeTextShort()

void regina::Manifold::writeTextShort ( std::ostream &  out) const
inlineinherited

Writes a short text representation of this object to the given output stream.

Subclasses must not override this routine. They should override writeName() instead.

Python
Not present; use str() instead.
Parameters
outthe output stream to which to write.

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