Regina 7.0 Calculation Engine
|
A structure used to track equivalence classes of tetrahedron vertices as the gluing permutation set is constructed. More...
#include <census/gluingpermsearcher3.h>
Public Member Functions | |
TetVertexState () | |
Constructor for a standalone tetrahedron vertex in an equivalence class all of its own. More... | |
void | dumpData (std::ostream &out) const |
Dumps all internal data in a plain text format to the given output stream. More... | |
bool | readData (std::istream &in, unsigned long nStates) |
Fills this state with data read from the given input stream. More... | |
TetVertexState (const TetVertexState &)=delete | |
TetVertexState & | operator= (const TetVertexState &)=delete |
Public Attributes | |
int | parent |
The index of the parent object in the current tree, or -1 if this object is the root of the tree. More... | |
unsigned | rank |
The depth of the subtree beneath this object (where a leaf node has depth zero). More... | |
unsigned | bdry |
The number of boundary edges in the vertex link for this equivalence class of vertices. More... | |
char | twistUp |
The identification of this object and its parent in the tree corresponds to a gluing of two triangles in the vertex link. More... | |
bool | hadEqualRank |
Did this tree have rank equal to its parent immediately before it was grafted beneath its parent? This information is used to maintain the ranks correctly when grafting operations are undone. More... | |
unsigned char | bdryEdges |
The number of edges of the triangular piece of vertex link that are in fact boundary edges of the vertex link. More... | |
int | bdryNext [2] |
If the corresponding triangular piece of vertex link has any boundary edges, bdryNext stores the indices of the tetrahedron vertices that provide the boundary edges following on from either end of this boundary segment. More... | |
char | bdryTwist [2] |
Describes whether the orientation of this boundary segment of the vertex link is consistent with the orientation of the adjacent segments on either side. More... | |
int | bdryNextOld [2] |
Stores a snapshot of the values in the bdryNext array from the last point in the search when bdryEdges was precisely two. More... | |
char | bdryTwistOld [2] |
Stores a snapshot of the values in the bdryTwist array from the last point in the search when bdryEdges was precisely two. More... | |
A structure used to track equivalence classes of tetrahedron vertices as the gluing permutation set is constructed.
Two vertices are considered equivalent if they are identified within the triangulation.
Tetrahedron vertices are indexed linearly by tetrahedron and then vertex number. Specifically, vertex v (0..3) of tetrahedron t (0..nTets-1) has index 4t+v.
Each equivalence class of vertices corresponds to a tree of TetVertexState objects, arranged to form a modified union-find structure.
Note that a single tetrahedron vertex (as described by this structure) provides a single triangular piece of the overall vertex link. This triangle piece is referred to in several of the data members below.
|
inline |
Constructor for a standalone tetrahedron vertex in an equivalence class all of its own.
Note that the vertex link will be a single triangle with three boundary edges.
void regina::CompactSearcher::TetVertexState::dumpData | ( | std::ostream & | out | ) | const |
Dumps all internal data in a plain text format to the given output stream.
This state can be recreated from this text data by calling readData().
This routine may be useful for transferring objects from one processor to another.
out | the output stream to which the data should be written. |
bool regina::CompactSearcher::TetVertexState::readData | ( | std::istream & | in, |
unsigned long | nStates | ||
) |
Fills this state with data read from the given input stream.
This routine reads data in the format written by dumpData().
This routine does test for bad input data, but it does not test for end-of-file.
in | the input stream from which to read. |
nStates | the total number of vertex states under consideration (this must be four times the number of tetrahedra). |
false
if any errors were encountered during reading, or true
otherwise. unsigned regina::CompactSearcher::TetVertexState::bdry |
The number of boundary edges in the vertex link for this equivalence class of vertices.
Any face whose gluing permutation has not yet been decided is treated as a boundary face. This value is only maintained correctly for the root of the corresponding object tree; other objects in the tree will have older values to facilitate backtracking.
unsigned char regina::CompactSearcher::TetVertexState::bdryEdges |
The number of edges of the triangular piece of vertex link that are in fact boundary edges of the vertex link.
Equivalently, this measures the number of faces of this tetrahedron meeting this vertex that are not yet joined to their partner faces. This always takes the value 0, 1, 2 or 3.
int regina::CompactSearcher::TetVertexState::bdryNext[2] |
If the corresponding triangular piece of vertex link has any boundary edges, bdryNext stores the indices of the tetrahedron vertices that provide the boundary edges following on from either end of this boundary segment.
Note that in most cases (see below) this is not the present vertex. For instance, if this vertex provides two boundary edges, then this array describes the boundary before the first edge and after the second.
The boundary segment described by bdryNext[1] follows on from this segment in the direction described by the vertexLinkNextFace array. The boundary segment in the other direction is described by bdryNext[0].
If the vertex link is just this one triangle (i.e., all three faces of this tetrahedron surrounding this vertex are boundary faces, or one is a boundary and the other two are joined together), then both elements of bdryNext refer to this vertex itself. These are the only situations in which bdryNext refers back to this vertex.
If the triangle is internal to the vertex link (i.e., bdryEdges is zero), then this array maintains the last values it had when there was at least one boundary edge earlier in the search.
Each element of this array lies between 0 and 4t-1 inclusive, where t is the total number of tetrahedra.
int regina::CompactSearcher::TetVertexState::bdryNextOld[2] |
Stores a snapshot of the values in the bdryNext array from the last point in the search when bdryEdges was precisely two.
If bdryEdges is still two or three, then this array is undefined.
char regina::CompactSearcher::TetVertexState::bdryTwist[2] |
Describes whether the orientation of this boundary segment of the vertex link is consistent with the orientation of the adjacent segments on either side.
See bdryNext for further discussion of boundary segments. The bdryNext array defines an orientation for this section of vertex link, pointing from the end described by bdryNext[0] to the end described by bdryNext[1].
For each i, the value bdryTwist[i] is 0 if the orientation of the adjacent segment described by bdryNext[i] is the same as this segment (as defined by the bdryNext values stored with the adjacent vertex), or 1 if the orientations differ.
If the triangle supplied by this vertex is internal to the vertex link, this array maintains the last values it had when there was at least one boundary edge earlier in the search (just like the bdryNext array).
char regina::CompactSearcher::TetVertexState::bdryTwistOld[2] |
Stores a snapshot of the values in the bdryTwist array from the last point in the search when bdryEdges was precisely two.
If bdryEdges is still two or three, then this array is undefined.
bool regina::CompactSearcher::TetVertexState::hadEqualRank |
Did this tree have rank equal to its parent immediately before it was grafted beneath its parent? This information is used to maintain the ranks correctly when grafting operations are undone.
If this object is still the root of its tree, this value is set to false.
int regina::CompactSearcher::TetVertexState::parent |
The index of the parent object in the current tree, or -1 if this object is the root of the tree.
unsigned regina::CompactSearcher::TetVertexState::rank |
The depth of the subtree beneath this object (where a leaf node has depth zero).
char regina::CompactSearcher::TetVertexState::twistUp |
The identification of this object and its parent in the tree corresponds to a gluing of two triangles in the vertex link.
Each of these triangles in the vertex link can be labelled with its own vertices 0, 1 and 2 and thereby be assigned a clockwise or anticlockwise orientation.
The parameter twistUp is 0 if these two triangles in the vertex link are joined in a way that preserves orientation, or 1 if the gluing does not preserve orientation.
If this object has no parent, the value of twistUp is undefined.