Regina 7.3 Calculation Engine
|
Represents an angle structure on a triangulation. More...
#include <angle/anglestructure.h>
Public Member Functions | |
AngleStructure (const AngleStructure &)=default | |
Creates a new copy of the given angle structure. More... | |
AngleStructure (const AngleStructure &src, const Triangulation< 3 > &triangulation) | |
Creates a new copy of the given angle structure, but relocated to the given triangulation. More... | |
AngleStructure (const AngleStructure &src, const SnapshotRef< Triangulation< 3 > > &triangulation) | |
Creates a new copy of the given angle structure, but relocated to the given triangulation. More... | |
AngleStructure (AngleStructure &&) noexcept=default | |
Moves the given angle structure into this new angle structure. More... | |
AngleStructure (const Triangulation< 3 > &triang, const Vector< Integer > &vector) | |
Creates a new angle structure on the given triangulation with the given coordinate vector. More... | |
AngleStructure (const Triangulation< 3 > &triang, Vector< Integer > &&vector) | |
Creates a new angle structure on the given triangulation with the given coordinate vector. More... | |
AngleStructure (const SnapshotRef< Triangulation< 3 > > &triang, const Vector< Integer > &vector) | |
Creates a new angle structure on the given triangulation with the given coordinate vector. More... | |
AngleStructure (const SnapshotRef< Triangulation< 3 > > &triang, Vector< Integer > &&vector) | |
Creates a new angle structure on the given triangulation with the given coordinate vector. More... | |
AngleStructure & | operator= (const AngleStructure &)=default |
Sets this to be a copy of the given angle structure. More... | |
AngleStructure & | operator= (AngleStructure &&) noexcept=default |
Moves the contents of the given angle structure to this structure. More... | |
void | swap (AngleStructure &other) noexcept |
Swaps the contents of this and the given angle structure. More... | |
Rational | angle (size_t tetIndex, int edgePair) const |
Returns the requested angle in this angle structure. More... | |
const Triangulation< 3 > & | triangulation () const |
Returns the triangulation on which this angle structure lies. More... | |
bool | isStrict () const |
Determines whether this is a strict angle structure. More... | |
bool | isTaut () const |
Determines whether this is a taut angle structure. More... | |
bool | isVeering () const |
Determines whether this is a veering structure. More... | |
const Vector< Integer > & | vector () const |
Gives read-only access to the integer vector that Regina uses internally to represent this angle structure. More... | |
bool | operator== (const AngleStructure &other) const |
Determines whether this and the given angle structure are identical. More... | |
bool | operator!= (const AngleStructure &other) const |
Determines whether this and the given angle structure are different. More... | |
bool | operator< (const AngleStructure &other) const |
Imposes a total order on all angle structures. More... | |
void | writeTextShort (std::ostream &out) const |
Writes a short text representation of this object to the given output stream. More... | |
void | writeXMLData (std::ostream &out) const |
Writes a chunk of XML containing this angle structure and all of its properties. More... | |
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 | calculateType () const |
Calculates the structure type (strict or taut) and stores it as a property. More... | |
Friends | |
class | regina::XMLAngleStructureReader |
Represents an angle structure on a triangulation.
Since Regina 7.0, you can modify or even destroy the original triangulation that was used to create this angle structure. If you do, then this angle structure will automatically make a private copy of the original triangulation as an ongoing reference. Different angle structures (and normal surfaces) can all share the same private copy, so this is not an expensive process.
This class implements C++ move semantics and adheres to the C++ Swappable requirement. It is designed to avoid deep copies wherever possible, even when passing or returning objects by value.
|
default |
Creates a new copy of the given angle structure.
|
inline |
Creates a new copy of the given angle structure, but relocated to the given triangulation.
A snapshot will be taken of the given triangulation as it appears right now. You may change or even delete the triangulation later on; if so, then this angle structure will still refer to the frozen snapshot that was taken at the time of construction.
src | the angle structure to copy. |
triangulation | the triangulation on which this new angle structure will be placed. |
|
inline |
Creates a new copy of the given angle structure, but relocated to the given triangulation.
src | the angle structure to copy. |
triangulation | a snapshot, frozen in time, of the triangulation on which this new angle structure will be placed. |
|
defaultnoexcept |
Moves the given angle structure into this new angle structure.
This is a fast (constant time) operation.
The angle structure that is passed will no longer be usable.
|
inline |
Creates a new angle structure on the given triangulation with the given coordinate vector.
A snapshot will be taken of the given triangulation as it appears right now. You may change or even delete the triangulation later on; if so, then this angle structure will still refer to the frozen snapshot that was taken at the time of construction.
triang | the triangulation on which this angle structure lies. |
vector | a vector containing the individual angles in the angle structure. |
|
inline |
Creates a new angle structure on the given triangulation with the given coordinate vector.
A snapshot will be taken of the given triangulation as it appears right now. You may change or even delete the triangulation later on; if so, then this angle structure will still refer to the frozen snapshot that was taken at the time of construction.
triang | the triangulation on which this angle structure lies. |
vector | a vector containing the individual angles in the angle structure. |
|
inline |
Creates a new angle structure on the given triangulation with the given coordinate vector.
triang | a snapshot, frozen in time, of the triangulation on which this angle structure lies. |
vector | a vector containing the individual angles in the angle structure. |
|
inline |
Creates a new angle structure on the given triangulation with the given coordinate vector.
triang | a snapshot, frozen in time, of the triangulation on which this angle structure lies. |
vector | a vector containing the individual angles in the angle structure. |
Rational regina::AngleStructure::angle | ( | size_t | tetIndex, |
int | edgePair | ||
) | const |
Returns the requested angle in this angle structure.
The angle returned will be scaled down; the actual angle is the returned value multiplied by π.
Within a tetrahedron, the three angles are indexed 0, 1 and 2. Angle i appears on edge i of the tetrahedron as well as its opposite edge (5-i).
tetIndex | the index in the triangulation of the tetrahedron in which the requested angle lives; this should be between 0 and Triangulation<3>::size()-1 inclusive. |
edgePair | the number representing the pair of edges holding the requested angle, as described above; this should be 0, 1 or 2. |
|
protected |
Calculates the structure type (strict or taut) and stores it as a property.
|
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.
|
inline |
Determines whether this is a strict angle structure.
A strict angle structure has all angles strictly between (not including) 0 and π.
true
if and only if this is a strict angle structure.
|
inline |
Determines whether this is a taut angle structure.
A taut angle structure contains only angles 0 and π.
Here we use the Kang-Rubinstein definition of a taut angle structure [1], which is based on the angles alone. In his original paper [2], Lackenby has an extra condition whereby 2-faces of the triangulation must have consistent coorientations, which we do not enforce here.
[1] E. Kang and J. H. Rubinstein, "Ideal triangulations of 3-manifolds II; Taut and angle structures", Algebr. Geom. Topol. 5 (2005), pp. 1505-1533.
[2] M. Lackenby, "Taut ideal triangulations of 3-manifolds", Geom. Topol. 4 (2000), pp. 369-395.
true
if and only if this is a taut structure.
|
inline |
Determines whether this is a veering structure.
A veering structure is taut angle structure with additional strong combinatorial constraints, which we do not outline here. For a definition, see C. D. Hodgson, J. H. Rubinstein, H. Segerman, and S. Tillmann, "Veering triangulations admit strict angle structures", Geom. Topol., 15 (2011), pp. 2073-2089.
Note that the Hodgson et al. definition is slightly more general than Agol's veering taut triangulations from his original paper: I. Agol, " Ideal triangulations of pseudo-Anosov mapping tori", in "Topology and Geometry in Dimension Three", volume 560 of Contemp. Math., pp. 1-17, Amer. Math. Soc., 2011. This mirrors the way in which the Kang-Rubinstein definition of taut angle structure is slightly more general than Lackenby's. See the Hodgson et al. paper for full details and comparisons between the two settings.
If this angle structure is not taut, or if the underlying triangulation is non-orientable, then this routine will return false
.
true
if and only if this is a veering structure.
|
inline |
Determines whether this and the given angle structure are different.
This routine is safe to call even if this and the given angle structure do not belong to the same triangulation:
true
.other | the angle structure to be compared with this structure. |
true
if and only if this and the given structure are different. bool regina::AngleStructure::operator< | ( | const AngleStructure & | other | ) | const |
Imposes a total order on all angle structures.
This order is not mathematically meaningful; it is merely provided for scenarios where you need to be able to sort angle structures (e.g., when using them as keys in a map).
The order is well-defined, and will be preserved across copy/move operations, different program executions, and different platforms (since it is defined purely in terms of the angle coordinates, and does not use transient properties such as locations in memory).
This operation is consistent with the equality test. In particular, it does not matter whether the two angle structures belong to different triangulations. See the equality test operator==() for further details.
other | the angle structure to be compared with this structure. |
true
if and only if this appears before the given structure in the total order.
|
defaultnoexcept |
Moves the contents of the given angle structure to this structure.
This is a fast (constant time) operation.
This and the given angle structure do not need to be on the same underlying triangulation, and they do not need to have the same length vectors (but of course if either property differs then this structure will be adjusted accordingly).
The structure that was passed will no longer be usable.
|
default |
Sets this to be a copy of the given angle structure.
This and the given angle structure do not need to be on the same underlying triangulation, and they do not need to have the same length vectors (but of course if either property differs then this structure will be adjusted accordingly).
This operator induces a deep copy of the given angle structure.
|
inline |
Determines whether this and the given angle structure are identical.
This routine is safe to call even if this and the given angle structure do not belong to the same triangulation:
false
.other | the angle structure to be compared with this structure. |
true
if and only if this and the given structure are identical.
|
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.
__str__()
will use precisely this function, and for most classes the Python __repr__()
function will incorporate this into its output.
|
inlinenoexcept |
Swaps the contents of this and the given angle structure.
This is a fast (constant time) operation.
This and the given angle structure do not need to be on the same underlying triangulation, and they do not need to have the same length vectors (but of course if either property differs then these features will be adjusted accordingly).
other | the angle structure whose contents should be swapped with this. |
|
inline |
Returns the triangulation on which this angle structure lies.
This will be a snapshot frozen in time of the triangulation that was originally passed to the AngleStructure constructor.
This will return a correct result even if the original triangulation has since been modified or destroyed. However, in order to ensure this behaviour, it is possible that at different points in time this function may return references to different C++ objects.
The rules for using the triangulation() reference are:
|
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.
Gives read-only access to the integer vector that Regina uses internally to represent this angle structure.
This vector contains one member per angle plus a final scaling member; to obtain the actual angle in the angle structure one should divide the corresonding angle member by the scaling member and then multiply by π.
If there are t tetrahedra in the underlying triangulation, there will be precisely 3t+1 elements in this vector. The first three elements will be the angle members for the first tetrahedron, the next three for the second tetrahedron and so on. For each tetrahedron, the three individual elements are the angle members corresponding to edges 0, 1 and 2 of the tetrahedron (and also their opposite edges 5, 4 and 3 respectively). The final element of the vector is the scaling member as described above.
|
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::AngleStructure::writeTextShort | ( | std::ostream & | out | ) | const |
Writes a short text representation of this object to the given output stream.
out | the output stream to which to write. |
void regina::AngleStructure::writeXMLData | ( | std::ostream & | out | ) | const |
Writes a chunk of XML containing this angle structure and all of its properties.
This routine will be called from within AngleStructures::writeXMLPacketData().
out | the output stream to which the XML should be written. |