Regina Calculation Engine
|
Represents a single normal hypersurface in a 4-manifold triangulation. More...
#include <hypersurface/normalhypersurface.h>
Public Member Functions | |
NormalHypersurface (const Triangulation< 4 > *triangulation, NormalHypersurfaceVector *vector) | |
Creates a new normal hypersurface inside the given triangulation with the given coordinate vector. More... | |
NormalHypersurface (const Triangulation< 4 > *triang, HyperCoords coordSystem, List allCoords) | |
A Python-only routine that creates a new normal hypersurface inside the given triangulation with the given coordinate vector. More... | |
~NormalHypersurface () | |
Destroys this normal hypersurface. More... | |
NormalHypersurface * | clone () const |
Creates a newly allocated clone of this normal hypersurface. More... | |
NormalHypersurface * | doubleHypersurface () const |
Creates a newly allocated hypersurface that is the double of this hypersurface. More... | |
LargeInteger | tetrahedra (size_t pentIndex, int vertex) const |
Returns the number of tetrahedron pieces of the given type in this normal hypersurface. More... | |
LargeInteger | prisms (size_t pentIndex, int prismType) const |
Returns the number of prism pieces of the given type in this normal hypersurface. More... | |
LargeInteger | edgeWeight (size_t edgeIndex) const |
Returns the number of times this normal hypersurface crosses the given edge. More... | |
size_t | countCoords () const |
Returns the number of coordinates in the specific underlying coordinate system being used. More... | |
const Triangulation< 4 > * | triangulation () const |
Returns the triangulation in which this normal hypersurface resides. More... | |
const std::string & | name () const |
Returns the name associated with this normal hypersurface. More... | |
void | setName (const std::string &name) |
Sets the name associated with this normal hypersurface. More... | |
void | writeTextShort (std::ostream &out) const |
Writes this hypersurface to the given output stream, using standard tetrahedron-prism coordinates. More... | |
void | writeRawVector (std::ostream &out) const |
Writes the underlying coordinate vector to the given output stream in text format. More... | |
void | writeXMLData (std::ostream &out) const |
Writes a chunk of XML containing this normal hypersurface and all of its properties. More... | |
bool | isEmpty () const |
Determines if this normal hypersurface is empty (has no pieces whatsoever). More... | |
bool | isCompact () const |
Determines if this normal hypersurface is compact (has finitely many pieces). More... | |
bool | isOrientable () const |
Returns whether or not this hypersurface is orientable. More... | |
bool | isTwoSided () const |
Returns whether or not this hypersurface is two-sided. More... | |
bool | isConnected () const |
Returns whether or not this hypersurface is connected. More... | |
bool | hasRealBoundary () const |
Determines if this hypersurface has any real boundary, that is, whether it meets any boundary tetrahedra of the triangulation. More... | |
bool | isVertexLinking () const |
Determines whether or not this hypersurface is vertex linking. More... | |
const Vertex< 4 > * | isVertexLink () const |
Determines whether or not a rational multiple of this hypersurface is the link of a single vertex. More... | |
const Edge< 4 > * | isThinEdgeLink () const |
Determines whether or not a rational multiple of this hypersurface is the thin link of a single edge. More... | |
const AbelianGroup & | homology () const |
Returns the first homology group of this hypersurface. More... | |
Triangulation< 3 > * | triangulate () const |
Returns a 3-manifold triangulation describing this normal hypersurface. More... | |
bool | sameSurface (const NormalHypersurface &other) const |
Determines whether this and the given hypersurface in fact represent the same normal hypersurface. More... | |
bool | embedded () const |
Determines whether this hypersurface is embedded. More... | |
bool | locallyCompatible (const NormalHypersurface &other) const |
Determines whether this and the given hypersurface are locally compatible. More... | |
const Ray & | rawVector () const |
Gives read-only access to the raw vector that sits beneath this normal hypersurface. More... | |
NormalHypersurface (const NormalHypersurface &)=delete | |
NormalHypersurface & | operator= (const NormalHypersurface &)=delete |
void | writeTextLong (std::ostream &out) const |
A default implementation for detailed output. 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... | |
Protected Member Functions | |
void | calculateRealBoundary () const |
Calculates whether this hypersurface has any real boundary and stores the result as a property. More... | |
void | calculateFromTriangulation () const |
Calculate and store all properties that we derive from the 3-manifold triangulation of this hypersurface. More... | |
Protected Attributes | |
NormalHypersurfaceVector * | vector_ |
Contains the coordinates of the normal hypersurface in whichever space is appropriate. More... | |
const Triangulation< 4 > * | triangulation_ |
The triangulation in which this normal hypersurface resides. More... | |
std::string | name_ |
An optional name associated with this hypersurface. More... | |
Property< bool > | orientable_ |
Is this hypersurface orientable? More... | |
Property< bool > | twoSided_ |
Is this hypersurface two-sided? More... | |
Property< bool > | connected_ |
Is this hypersurface connected? More... | |
Property< bool > | realBoundary_ |
Does this hypersurface have real boundary (i.e. More... | |
Property< bool > | compact_ |
Is this hypersurface compact (i.e., does it only contain finitely many pieces)? More... | |
Property< AbelianGroup, StoreManagedPtr > | H1_ |
First homology group of the hypersurface. More... | |
Friends | |
class | XMLNormalHypersurfaceReader |
Represents a single normal hypersurface in a 4-manifold triangulation.
Once the underlying triangulation changes, this normal hypersurface object is no longer valid.
The information provided by the various query methods is independent of the underlying coordinate system being used. See the NormalHypersurfaceVector class notes for details of what to do when introducing a new coordinate system.
Note that non-compact surfaces (surfaces with infinitely many pieces, are allowed; in these cases, the corresponding coordinate lookup routines will return LargeInteger::infinity where appropriate.
regina::NormalHypersurface::NormalHypersurface | ( | const Triangulation< 4 > * | triangulation, |
NormalHypersurfaceVector * | vector | ||
) |
Creates a new normal hypersurface inside the given triangulation with the given coordinate vector.
This normal hypersurface will claim ownership of the given vector (i.e., you should not change or delete the vector yourself afterwards).
triangulation | the triangulation in which this normal hypersurface resides. |
vector | a vector containing the coordinates of the normal hypersurface in whichever space is appropriate. |
regina::NormalHypersurface::NormalHypersurface | ( | const Triangulation< 4 > * | triang, |
HyperCoords | coordSystem, | ||
List | allCoords | ||
) |
A Python-only routine that creates a new normal hypersurface inside the given triangulation with the given coordinate vector.
triang | the triangulation in which this normal hypersurface resides. |
coordSystem | the coordinate system used by this normal hypersurface. |
allCoords | the corresponding vector of normal coordinates, expressed as a Python list. The list elements will be converted internally to LargeInteger objects. |
|
inline |
Destroys this normal hypersurface.
The underlying vector of coordinates will also be deallocated.
|
protected |
Calculate and store all properties that we derive from the 3-manifold triangulation of this hypersurface.
|
protected |
Calculates whether this hypersurface has any real boundary and stores the result as a property.
NormalHypersurface* regina::NormalHypersurface::clone | ( | ) | const |
Creates a newly allocated clone of this normal hypersurface.
The name of the normal hypersurface will not be copied to the clone; instead the clone will have an empty name.
|
inline |
Returns the number of coordinates in the specific underlying coordinate system being used.
|
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.
NormalHypersurface* regina::NormalHypersurface::doubleHypersurface | ( | ) | const |
Creates a newly allocated hypersurface that is the double of this hypersurface.
|
inline |
Returns the number of times this normal hypersurface crosses the given edge.
edgeIndex | the index in the triangulation of the edge in which we are interested; this should be between 0 and Triangulation<4>::countEdges()-1 inclusive. |
bool regina::NormalHypersurface::embedded | ( | ) | const |
Determines whether this hypersurface is embedded.
This is true if and only if the surface contains no conflicting prism types.
true
if and only if this hypersurface is embedded.
|
inline |
Determines if this hypersurface has any real boundary, that is, whether it meets any boundary tetrahedra of the triangulation.
This routine caches its results, which means that once it has been called for a particular surface, subsequent calls return the answer immediately.
true
if and only if this hypersurface has real boundary.
|
inline |
Returns the first homology group of this hypersurface.
There is an important caveat regarding invalid 4-manifold triangulations. If the underlying triangulation has edge links that are not spheres, then it is possible that this normal hypersurface is not a compact 3-manifold. In such a case, this routine will compute homology in the same way as Triangulation<3>::homology() - that is, by effectively truncating ideal points of the hypersurface (which may arise where the hypersurface meets an invalid edge).
This routine caches its results, which means that once it has been called for a particular surface, subsequent calls return the answer immediately.
|
inline |
Determines if this normal hypersurface is compact (has finitely many pieces).
This routine caches its results, which means that once it has been called for a particular surface, subsequent calls return the answer immediately.
true
if and only if this normal hypersurface is compact.
|
inline |
Returns whether or not this hypersurface is connected.
This routine caches its results, which means that once it has been called for a particular surface, subsequent calls return the answer immediately.
true
if this hypersurface is connected, or false
if this hypersurface is disconnected. bool regina::NormalHypersurface::isEmpty | ( | ) | const |
Determines if this normal hypersurface is empty (has no pieces whatsoever).
|
inline |
Returns whether or not this hypersurface is orientable.
ยท This routine caches its results, which means that once it has been called for a particular surface, subsequent calls return the answer immediately.
true
if this hypersurface is orientable, or false
if this hypersurface is non-orientable.
|
inline |
Determines whether or not a rational multiple of this hypersurface is the thin link of a single edge.
Note that the results of this routine are not cached. Thus the results will be reevaluated every time this routine is called.
|
inline |
Returns whether or not this hypersurface is two-sided.
This routine caches its results, which means that once it has been called for a particular surface, subsequent calls return the answer immediately.
true
if this hypersurface is two-sided, or false
if this hypersurface is one-sided.
|
inline |
Determines whether or not a rational multiple of this hypersurface is the link of a single vertex.
Note that the results of this routine are not cached. Thus the results will be reevaluated every time this routine is called.
|
inline |
Determines whether or not this hypersurface is vertex linking.
A vertex linking hypersurface contains only tetrahedra.
Note that the results of this routine are not cached. Thus the results will be reevaluated every time this routine is called.
true
if and only if this hypersurface is vertex linking. bool regina::NormalHypersurface::locallyCompatible | ( | const NormalHypersurface & | other | ) | const |
Determines whether this and the given hypersurface are locally compatible.
Local compatibility means that, within each individual pentachoron of the triangulation, it is possible to arrange the normal discs of both hypersurfaces so that none intersect.
This is a local constraint, not a global constraint. That is, we do not insist that we can avoid intersections within all pentachora simultaneously.
Local compatibility can be formulated in terms of normal piece types. Two normal hypersurfaces are locally compatible if and only if they together use at most two prism piece types per pentachoron; moreover, if there are two prism piece types within a single pentachoron then these prism types are non-intersecting.
If one of the two hypersurfaces breaks the local compatibility constraints on its own (for instance, it contains two conflicting prism types within the same pentachoron), then this routine will return false
regardless of what the other hypersurface contains.
other | the other hypersurface to test for local compatibility with this hypersurface. |
true
if the two hypersurfaces are locally compatible, or false
if they are not.
|
inline |
Returns the name associated with this normal hypersurface.
Names are optional and need not be unique. The default name for a hypersurface is the empty string.
|
inline |
Returns the number of prism pieces of the given type in this normal hypersurface.
A prism piece type is identified by specifying a pentachoron and an edge of that pentachoron; prisms of this type will then separate edge i of the pentachoron from triangle i of the pentachoron.
If you are using a coordinate system that adorns pieces with additional information (such as orientation), this routine returns the total number of prisms in the given pentachoron of the given type.
pentIndex | the index in the triangulation of the pentachoron in which the requested prisms reside; this should be between 0 and Triangulation<4>::size()-1 inclusive. |
prismType | specifies the edge of the given pentachoron that this prism separates from the opposite triangle; this should be between 0 and 9 inclusive. |
|
inline |
Gives read-only access to the raw vector that sits beneath this normal hypersurface.
Generally users should not need this function. However, it is provided here in case the need should arise (e.g., for reasons of efficiency).
@return the underlying raw vector.
bool regina::NormalHypersurface::sameSurface | ( | const NormalHypersurface & | other | ) | const |
Determines whether this and the given hypersurface in fact represent the same normal hypersurface.
Specifically, this routine examines (or computes) the number of normal pieces of each type, and returns true
if and only if these counts are the same for both hypersurfaces.
It does not matter what coordinate systems the two hypersurfaces use. In particular, it does not matter if this and the given hypersurface use different coordinate systems.
other | the hypersurface to be compared with this hypersurface. |
true
if both hypersurfaces represent the same normal hypersurface, or false
if not.
|
inline |
Sets the name associated with this normal hypersurface.
Names are optional and need not be unique. The default name for a hypersurface is the empty string.
name | the new name to associate with this hypersurface. |
|
inherited |
Returns a short text representation of this object.
This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.
__str__()
.
|
inline |
Returns the number of tetrahedron pieces of the given type in this normal hypersurface.
A tetrahedron piece type is identified by specifying a pentachoron and a vertex of that pentachoron that the tetrahedron surrounds.
If you are using a coordinate system that adorns pieces with additional information (such as orientation), this routine returns the total number of tetrahedra in the given pentachoron of the given type.
pentIndex | the index in the triangulation of the pentachoron in which the requested pieces reside; this should be between 0 and Triangulation<4>::size()-1 inclusive. |
vertex | the vertex of the given pentachoron around which the requested pieces lie; this should be between 0 and 4 inclusive. |
Triangulation<3>* regina::NormalHypersurface::triangulate | ( | ) | const |
Returns a 3-manifold triangulation describing this normal hypersurface.
The triangulation will be simplified via Triangulation<3>::intelligentSimplify(), which means that the tetrahedra of the final triangulation are not likely to correspond to any particular tetrahedron/prism pieces of this normal hypersurface.
The 3-manifold triangulation will be newly allocated, and destroying it is the responsibility of the caller of this routine.
|
inline |
Returns the triangulation in which this normal hypersurface resides.
|
inherited |
Returns a short text representation of this object using unicode characters.
Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.
|
inline |
Writes the underlying coordinate vector to the given output stream in text format.
No indication will be given as to which coordinate system is being used or what each coordinate means. No newline will be written.
out | the output stream to which to write. |
|
inlineinherited |
A default implementation for detailed output.
This routine simply calls T::writeTextShort() and appends a final newline.
out | the output stream to which to write. |
void regina::NormalHypersurface::writeTextShort | ( | std::ostream & | out | ) | const |
Writes this hypersurface to the given output stream, using standard tetrahedron-prism coordinates.
out | the output stream to which to write. |
void regina::NormalHypersurface::writeXMLData | ( | std::ostream & | out | ) | const |
Writes a chunk of XML containing this normal hypersurface and all of its properties.
This routine will be called from within NormalHypersurfaces::writeXMLPacketData().
out | the output stream to which the XML should be written. |
|
mutableprotected |
Is this hypersurface compact (i.e., does it only contain finitely many pieces)?
|
mutableprotected |
Is this hypersurface connected?
|
mutableprotected |
First homology group of the hypersurface.
|
protected |
An optional name associated with this hypersurface.
|
mutableprotected |
Is this hypersurface orientable?
|
mutableprotected |
Does this hypersurface have real boundary (i.e.
does it meet any boundary facets)?
|
protected |
The triangulation in which this normal hypersurface resides.
|
mutableprotected |
Is this hypersurface two-sided?
|
protected |
Contains the coordinates of the normal hypersurface in whichever space is appropriate.