Regina Calculation Engine
Public Member Functions | Protected Member Functions | List of all members
regina::detail::FaceValidity< allowsInvalid, testLinks > Class Template Reference

Helper class that stores whether a face is valid. More...

#include <triangulation/detail/face.h>

Public Member Functions

bool isValid () const
 Determines if this face is valid. More...
 
bool hasBadIdentification () const
 Determines if this face is identified with itself under a non-identity permutation. More...
 
bool hasBadLink () const
 Determines if this face does not have an appropriate link. More...
 

Protected Member Functions

 FaceValidity ()
 Initialises this face as valid. More...
 
void markBadIdentification ()
 Marks this face as having a non-identity self-identification. More...
 
void markBadLink ()
 Marks this face as having a bad link. More...
 

Detailed Description

template<bool allowsInvalid, bool testLinks>
class regina::detail::FaceValidity< allowsInvalid, testLinks >

Helper class that stores whether a face is valid.

Every class Face<dim, subdim> inherits from this class.

See isValid() for details on what it means for a face to be valid.

Template Parameters
allowsInvalidtrue when this is used for dimensions (dim, subdim) in which it is possible for faces to be invalid, or false for dimensions in which faces are always valid. If this is false, then this class optimises away all the implementation details to leave no overhead at all.
testLinkstrue if the underlying dimension dim is one of Regina's standard dimensions, or false if not. In non-standard dimensions, this class uses a more limited definition of validity that does not test for validity of vertex links. See isValid() for details.

Constructor & Destructor Documentation

◆ FaceValidity()

template<bool allowsInvalid, bool testLinks>
regina::detail::FaceValidity< allowsInvalid, testLinks >::FaceValidity ( )
protected

Initialises this face as valid.

Member Function Documentation

◆ hasBadIdentification()

template<bool allowsInvalid, bool testLinks>
bool regina::detail::FaceValidity< allowsInvalid, testLinks >::hasBadIdentification ( ) const

Determines if this face is identified with itself under a non-identity permutation.

For example, if this face is an edge then this routine tests whether the edge is identified with itself in reverse.

Such a face will always be marked as invalid. Note that, for standard dimensions dim, there are other types of invalid faces also. See isValid() for a full discussion of what it means for a face to be valid.

Returns
true if and only if this face is identified with itself under a non-identity permutation.

◆ hasBadLink()

template<bool allowsInvalid, bool testLinks>
bool regina::detail::FaceValidity< allowsInvalid, testLinks >::hasBadLink ( ) const

Determines if this face does not have an appropriate link.

See condition (2) in the documentation for isValid() for a full description of what "appropriate" means.

This routine is only available where dim is one of Regina's standard dimensions, since testing this condition in arbitrary dimensions is undecidable. For higher dimensions dim, this routine is not present.

A face whose link is not appropriate will always be marked as invalid. Note that there are other types of invalid faces also. See isValid() for a full discussion of what it means for a face to be valid.

Returns
true if and only if the link of this face is not appropriate.

◆ isValid()

template<bool allowsInvalid, bool testLinks>
bool regina::detail::FaceValidity< allowsInvalid, testLinks >::isValid ( ) const

Determines if this face is valid.

There are several conditions that might make a subdim-face of a dim-dimensional triangulation invalid:

  1. if the face is identified with itself under a non-identity permutation (e.g., an edge is identified with itself in reverse, or a triangle is identified with itself under a rotation);
  2. if the face does not have an appropriate link. Here the meaning of "appropriate" depends upon the type of face:
    • for a face that belongs to some boundary facet(s) of the triangulation, its link must be a topological ball;
    • for a vertex that does not belong to any boundary facets, its link must be a closed (dim - 1)-manifold;
    • for a (subdim ≥ 1)-face that does not belong to any boundary facets, its link must be a topological sphere.

Condition (1) is tested for all dimensions subdim and dim. Condition (2) is more difficult, since it relies on undecidable problems. As a result, (2) is only tested when dim is one of Regina's standard dimensions.

If this face is invalid, then it is possible to find out why. In non-standard dimensions, this must mean that the face fails condition (1) above. In standard dimensions, you can call the functions hasBadIdentification() and/or hasBadLink() to determine whether the failure is due to conditions (1) or (2) respectively.

Returns
for standard dimensions dim, returns true if and only if this face is valid according to both conditions (1) and (2) above; for non-standard dimensions dim, returns true if and only if this face is valid according to condition (1).

◆ markBadIdentification()

template<bool allowsInvalid, bool testLinks>
void regina::detail::FaceValidity< allowsInvalid, testLinks >::markBadIdentification ( )
protected

Marks this face as having a non-identity self-identification.

◆ markBadLink()

template<bool allowsInvalid, bool testLinks>
void regina::detail::FaceValidity< allowsInvalid, testLinks >::markBadLink ( )
protected

Marks this face as having a bad link.


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