Regina Calculation Engine
|
A base class for additional banning and marking constraints that we can place on tree traversal algorithms.
More...
#include <enumerate/treeconstraint.h>
Protected Member Functions | |
BanConstraintBase (const Triangulation< 3 > *tri, int coords) | |
Constructs and initialises the banned_ and marked_ arrays to be entirely false . More... | |
~BanConstraintBase () | |
Destroys this object and all associated data. 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... | |
void | init (const int *columnPerm) |
Identifies which coordinates to ban and mark, and records the corresponding tableaux columns in the banned_ and marked_ arrays respectively. More... | |
BanConstraintBase (const BanConstraintBase &)=delete | |
BanConstraintBase & | operator= (const BanConstraintBase &)=delete |
Static Protected Member Functions | |
static bool | supported (NormalCoords coords) |
Indicates whether the given coordinate system is supported by this constraint class. More... | |
Protected Attributes | |
const Triangulation< 3 > * | tri_ |
The triangulation with which we are working. More... | |
int | coords_ |
The normal or almost normal coordinate system in which we are working. 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... | |
A base class for additional banning and marking constraints that we can place on tree traversal algorithms.
This is used with TreeEnumeration, TreeSingleSoln and related algorithms for enumerating and locating normal surfaces and angle structures in a 3-manifold triangulation.
This class adds constraints of two types:
All of these constraints operate only on normal or angle structure coordinates in the underlying tableaux (and in particular not the additional variables introduced by additional linear constraints, as described by LPConstraintBase and its subclasses).
Currently marking is used in the following ways:
At present, marking is not used at all for quadrilateral coordinates or angle structures. However, marking is a very new feature, and this concept may be expanded in future versions of Regina.
This class does not record disc types in the order of their normal or angle structure coordinates; instead it records them in the order of their columns in a tableaux for linear programming (as used in LPInitialTableaux). This means that there is a little more work required in setting up the initial lists of banned and marked columns, but then these lists are easy to use on the fly during tree traversal algorithms.
This base class provides limited functionality (as documented below). Subclasses must implement a constructor (which, like this base class, takes a triangulation and a coordinate system), must implement init() which determines which coordinates are banned and/or marked, and must implement supported(), which indicates which normal or angle structure coordinate system this constraint class can work with.
|
protected |
Constructs and initialises the banned_ and marked_ arrays to be entirely false
.
The only purpose of passing the triangulation and coordinate system is to determine how many normal or angle structure coordinates we are dealing with.
tri | the triangulation with which we are working. |
coords | the coordinate system in which we are working. This must be one of NS_QUAD, NS_STANDARD, NS_AN_QUAD_OCT, NS_AN_STANDARD, or NS_ANGLE. |
|
inlineprotected |
Destroys this object and all associated data.
|
inlineprotected |
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.
lp | the tableaux in which to enforce the bans. |
|
protected |
Identifies which coordinates to ban and mark, and records the corresponding tableaux columns in the banned_ and marked_ arrays respectively.
columnPerm | the permutation of columns that describes how columns of the tableaux correspond to normal or angle strutcure coordinates in the underlying triangulation. Specifically, this permutation must be the same permutation returned by LPInitialTableaux::columnPerm(). |
|
staticprotected |
Indicates whether the given coordinate system is supported by this constraint class.
This routine assumes that the given system is already known to be supported by the generic tree traversal infrastructure, and only returns false
if there are additional prerequisites imposed by this particular constraint class that the given system does not satisfy. If this constraint class does not impose any of its own additional conditions, this routine may simply return true
.
coords | the coordinate system being queried; this must be one of the coordinate systems known to be supported by the generic TreeTraversal infrastructure. |
true
if and only if this coordinate system is also supported by this specific constraint class.
|
protected |
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.
|
protected |
The normal or almost normal coordinate system in which we are working.
This must be one of NS_QUAD, NS_STANDARD, NS_AN_QUAD_OCT, NS_AN_STANDARD, or NS_ANGLE.
|
protected |
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.
|
protected |
The triangulation with which we are working.