A class that bans normal disc types that meet a particular edge of the underlying triangulation.
More...
|
template<class LPConstraint > |
| BanEdge (const LPInitialTableaux< LPConstraint > &init, Edge< 3 > *edge) |
| Constructs a new set of banning and marking constraints. More...
|
|
template<class LPConstraint , typename IntType > |
void | enforceBans (LPData< LPConstraint, IntType > &lp) const |
| Enforces all bans described by this class in the given tableaux. More...
|
|
bool | marked (size_t column) const |
| Identifies whether the given column of the tableaux corresponds to a marked coordinate (e.g., a marked normal disc type). More...
|
|
bool | operator== (const BanConstraintBase &other) const |
| Determines if this and the given object ban and mark the same tableaux coordinates as each other. More...
|
|
bool | operator!= (const BanConstraintBase &other) const |
| Determines if this and the given object do not ban and mark the same tableaux coordinates as each other. More...
|
|
void | writeTextShort (std::ostream &out) const |
| Writes a short text representation of this object to the given output stream. 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...
|
|
A class that bans normal disc types that meet a particular edge of the underlying triangulation.
No disc types are marked at all.
This class is only for use with normal or almost normal surfaces, not angle structures.
- Warning
- This class only works as expected with vector encodings that explicitly include triangles (e.g., encodings for standard normal or almost normal coordinates). In quadrilateral or quadrilateral-octagon coordinates it will only ban quadrilaterals or octagons that meet the given edge, but it will still allow triangles that meet the edge (since triangle types are not counted in these coordinate systems). The supported() routine will only return
true
for encodings that include triangles.
See the BanConstraintBase class notes for details on all member functions and structs.
These ban constraint classes are designed mainly to act as C++ template arguments, and end users will typically not need to construct their own object of these classes. Instead, to use a ban constraint class, pass it as a template parameter to one of the tree traversal subclasses (e.g., TreeEnumeration, TreeSingleSolution, or TautEnumeration).
- Headers
- Some templated parts of this class are implemented in a separate header (treeconstraint-impl.h), which is not included automatically by this file. Most end users should not need this extra header, since Regina's calculation engine already includes explicit instantiations for common template arguments.
- Python
- It is rare that you would need to access this class directly through Python. Instead, to use a ban constraint class, you would typically create a tree traversal object with the appropriate class suffix (e.g., one such Python class is
TreeEnumeration_BanEdge
). See the BanConstraintBase class notes for further details.
- Warning
- The API for this class or function has not yet been finalised. This means that the interface may change in new versions of Regina, without maintaining backward compatibility. If you use this class directly in your own code, please check the detailed changelog with each new release to see if you need to make changes to your code.
template<class LPConstraint >
Constructs a new set of banning and marking constraints.
This base class constructor will construct the banned_ and marked_ arrays to be the correct size based on the given tableaux, and will initialise their contents to ban disc types that meet the given edge.
No disc types will be marked.
- Parameters
-
init | the original starting tableaux being used for this enumeration task. This tableaux must work with normal or almost normal surface coordinates (not angle structure coordinates). |
edge | the specific edge that our normal discs must not meet. |
Determines if this and the given object do not ban and mark the same tableaux coordinates as each other.
Even if this and the given object are of different subclasses of BanConstraintBase, as long as they ban the same coordinates and mark the same coordinates, they will compare as equal (i.e., this inequality comparison will return false
).
It does not matter whether the two objects use the same underlying tableaux. However, if the underlying tableaux use triangulations of different sizes and/or different broad classes of vector encodings (as described by LPSystem), then these two objects will compare as not equal.
- Parameters
-
other | the object to compare with this. |
- Returns
true
if and only if this and the object do not ban and mark the same tableaux coordinates, as described above.
Determines if this and the given object ban and mark the same tableaux coordinates as each other.
Even if this and the given object are of different subclasses of BanConstraintBase, as long as they ban the same coordinates and mark the same coordinates, they will compare as equal.
It does not matter whether the two objects use the same underlying tableaux. However, if the underlying tableaux use triangulations of different sizes and/or different broad classes of vector encodings (as described by LPSystem), then these two objects will compare as not equal.
- Parameters
-
other | the object to compare with this. |
- Returns
true
if and only if this and the object ban and mark the same tableaux coordinates, as described above.
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.
- Python
- The Python "stringification" function
__str__()
will use precisely this function, and for most classes the Python __repr__()
function will incorporate this into its output.
- Returns
- a short text representation of this object.
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.
- Returns
- a short text representation of this object.