Regina Calculation Engine
|
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... | |
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.
allowsInvalid | true 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. |
testLinks | true 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. |
|
protected |
Initialises this face as valid.
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.
true
if and only if this face is identified with itself under a non-identity permutation. 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.
true
if and only if the link of this face is not appropriate. 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:
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.
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).
|
protected |
Marks this face as having a non-identity self-identification.
|
protected |
Marks this face as having a bad link.