Regina 7.3 Calculation Engine
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
regina::BanBoundary Class Reference

A class that bans normal disc types that meet the boundary of the underlying triangulation. More...

#include <enumerate/treeconstraint.h>

Inheritance diagram for regina::BanBoundary:
regina::BanConstraintBase regina::ShortOutput< BanConstraintBase > regina::Output< BanConstraintBase, false >

Public Member Functions

template<class LPConstraint >
 BanBoundary (const LPInitialTableaux< LPConstraint > &init)
 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...
 

Static Public Member Functions

static bool supported (NormalEncoding enc)
 

Protected Attributes

const Triangulation< 3 > & tri_
 The triangulation with which we are working. More...
 
LPSystem system_
 The broad class of vector encodings that our enumeration task is working with. More...
 
bool * banned_
 Indicates which columns of a tableaux correspond to banned coordinates (e.g., banned normal disc types). More...
 
bool * marked_
 Indicates which columns of a tableaux correspond to marked coordinates (e.g., marked normal disc types). More...
 

Detailed Description

A class that bans normal disc types that meet the boundary 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 touch the boundary, but it will still allow triangles that meet the boundary (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_BanBoundary). 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.

Constructor & Destructor Documentation

◆ BanBoundary()

template<class LPConstraint >
regina::BanBoundary::BanBoundary ( const LPInitialTableaux< LPConstraint > &  init)

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 triangulation boundary.

No disc types will be marked.

Parameters
initthe original starting tableaux being used for this enumeration task. This tableaux must work with normal or almost normal surface coordinates (not angle structure coordinates).

Member Function Documentation

◆ detail()

std::string regina::Output< BanConstraintBase , supportsUtf8 >::detail ( ) const
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.

Returns
a detailed text representation of this object.

◆ enforceBans()

template<class LPConstraint , typename IntType >
void regina::BanConstraintBase::enforceBans ( LPData< LPConstraint, IntType > &  lp) const
inlineinherited

Enforces all bans described by this class in the given tableaux.

Specifically, for each banned coordinate, this routine calls LPData::constrainZero() on the corresponding coordinate column.

Parameters
lpthe tableaux in which to enforce the bans.

◆ marked()

bool regina::BanConstraintBase::marked ( size_t  column) const
inlineinherited

Identifies whether the given column of the tableaux corresponds to a marked coordinate (e.g., a marked normal disc type).

Parameters
columna column of the tableaux. This must be one of the columns corresponding to a normal or angle structure coordinate, not one of the extra columns induced by an LPConstraint parameter for the tree traversal class.
Returns
true if and only if the given column corresponds to a marked coordinate.

◆ operator!=()

bool regina::BanConstraintBase::operator!= ( const BanConstraintBase other) const
inlineinherited

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

◆ operator==()

bool regina::BanConstraintBase::operator== ( const BanConstraintBase other) const
inlineinherited

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

◆ str()

std::string regina::Output< BanConstraintBase , supportsUtf8 >::str ( ) const
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.

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.

◆ utf8()

std::string regina::Output< BanConstraintBase , supportsUtf8 >::utf8 ( ) const
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.

Returns
a short text representation of this object.

◆ writeTextLong()

void regina::ShortOutput< BanConstraintBase , false >::writeTextLong ( std::ostream &  out) const
inlineinherited

A default implementation for detailed output.

This routine simply calls T::writeTextShort() and appends a final newline.

Python
Not present. Instead you can call detail() from the subclass T, which returns this output as a string.
Parameters
outthe output stream to which to write.

◆ writeTextShort()

void regina::BanConstraintBase::writeTextShort ( std::ostream &  out) const
inherited

Writes a short text representation of this object to the given output stream.

Python
Not present. Use str() instead.
Parameters
outthe output stream to which to write.

Member Data Documentation

◆ banned_

bool* regina::BanConstraintBase::banned_
protectedinherited

Indicates which columns of a tableaux correspond to banned coordinates (e.g., banned normal disc types).

The size of this array is the number of normal or angle structure coordinates (so we explicitly exclude extra columns that arise from the template parameter LPConstraint.

◆ marked_

bool* regina::BanConstraintBase::marked_
protectedinherited

Indicates which columns of a tableaux correspond to marked coordinates (e.g., marked normal disc types).

The size of this array is the number of normal or angle structure coordinates (so we explicitly exclude extra columns that arise from the template parameter LPConstraint.

◆ system_

LPSystem regina::BanConstraintBase::system_
protectedinherited

The broad class of vector encodings that our enumeration task is working with.

◆ tri_

const Triangulation<3>& regina::BanConstraintBase::tri_
protectedinherited

The triangulation with which we are working.


The documentation for this class was generated from the following file:

Copyright © 1999-2023, 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).