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


A base class for additional banning and marking constraints that we can place on tree traversal algorithms. More...

#include <enumerate/treeconstraint.h>

Inheritance diagram for regina::BanConstraintBase:
regina::BanBoundary regina::BanNone regina::BanTorusBoundary

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
 
BanConstraintBaseoperator= (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...
 

Detailed Description


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.

Warning
The API for this class has not yet been finalised. This means that the class interface may change in new versions of Regina, without maintaining backward compatibility. If you use this class directly in your own code, please watch the detailed changelogs upon new releases to see if you need to make changes to your code.
Python
Not present.

Constructor & Destructor Documentation

◆ BanConstraintBase()

regina::BanConstraintBase::BanConstraintBase ( const Triangulation< 3 > *  tri,
int  coords 
)
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.

Warning
Before you use this object, the routine init() must be called to fill in the banned_ and marked_ arrays with the correct data. Otherwise you will have no banned or marked disc types at all.
Parameters
trithe triangulation with which we are working.
coordsthe 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.

◆ ~BanConstraintBase()

regina::BanConstraintBase::~BanConstraintBase ( )
inlineprotected

Destroys this object and all associated data.

Member Function Documentation

◆ enforceBans()

template<class LPConstraint , typename IntType >
void regina::BanConstraintBase::enforceBans ( LPData< LPConstraint, IntType > &  lp) const
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.

Parameters
lpthe tableaux in which to enforce the bans.

◆ init()

void regina::BanConstraintBase::init ( const int *  columnPerm)
protected

Identifies which coordinates to ban and mark, and records the corresponding tableaux columns in the banned_ and marked_ arrays respectively.

Parameters
columnPermthe 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().

◆ supported()

static bool regina::BanConstraintBase::supported ( NormalCoords  coords)
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.

Parameters
coordsthe coordinate system being queried; this must be one of the coordinate systems known to be supported by the generic TreeTraversal infrastructure.
Returns
true if and only if this coordinate system is also supported by this specific constraint class.

Member Data Documentation

◆ banned_

bool* regina::BanConstraintBase::banned_
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.

◆ coords_

int regina::BanConstraintBase::coords_
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.

◆ marked_

bool* regina::BanConstraintBase::marked_
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.

◆ tri_

const Triangulation<3>* regina::BanConstraintBase::tri_
protected

The triangulation with which we are working.


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

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