Regina Calculation Engine
Public Member Functions | List of all members
regina::LPConstraintBase::Coefficients Struct Reference

Stores the extra coefficients in a single column for the nConstraints additional rows that we add to the tableaux to describe the nConstraints additional linear equations or inequalities. More...

#include <enumerate/treeconstraint.h>

Public Member Functions

 Coefficients ()
 Creates an uninitialised set of coefficients for a single column. More...
 
template<typename IntType >
void fillFinalRows (LPMatrix< IntType > &m, unsigned col) const
 Explicitly fills the final row(s) of the given tableaux matrix with the coefficients stored in this Coefficients structure. More...
 
template<typename IntType >
IntType innerProduct (const LPMatrix< IntType > &m, unsigned mRow) const
 Computes the inner product of (i) the final nConstraints entries in the given row of the given matrix with (ii) the nConstraints column coefficients stored in this data structure. More...
 
template<typename IntType >
IntType innerProductOct (const LPMatrix< IntType > &m, unsigned mRow) const
 A variant of innerProduct() that takes into account any adjustments to these linear constraint(s) that are required when this is a quadrilateral column being used to represent an octagon type. More...
 

Detailed Description

Stores the extra coefficients in a single column for the nConstraints additional rows that we add to the tableaux to describe the nConstraints additional linear equations or inequalities.

Subclasses may store these coefficients however they like (in particular, they may optimise for sparse coefficients, binary coefficients, and so on). They will only ever be accessed through the member functions of this Coefficients class.

Constructor & Destructor Documentation

◆ Coefficients()

regina::LPConstraintBase::Coefficients::Coefficients ( )

Creates an uninitialised set of coefficients for a single column.

These cofficients must be initialised through a call to addRows() before they can be used.

Member Function Documentation

◆ fillFinalRows()

template<typename IntType >
void regina::LPConstraintBase::Coefficients::fillFinalRows ( LPMatrix< IntType > &  m,
unsigned  col 
) const

Explicitly fills the final row(s) of the given tableaux matrix with the coefficients stored in this Coefficients structure.

In essence, this routine simply copies this sparse and/or specialised representation of the final row(s) into a more standard dense matrix representation.

This routine should only affect the final nConstraints entries in the given column of the matrix. It may assume that these final row(s) have already been initialised to zero.

Precondition
The given matrix has at least nConstraints rows and at least col + 1 columns.
The final nConstraints entries in column col of the given matrix have already been set to zero.
Parameters
mthe matrix in which to place these column coefficients.
colthe column of the given matrix in which to place these coefficients.

◆ innerProduct()

template<typename IntType >
IntType regina::LPConstraintBase::Coefficients::innerProduct ( const LPMatrix< IntType > &  m,
unsigned  mRow 
) const

Computes the inner product of (i) the final nConstraints entries in the given row of the given matrix with (ii) the nConstraints column coefficients stored in this data structure.

Precondition
The given matrix has at least nConstraints columns and at least mRow + 1 rows.
Parameters
mthe matrix whose row we will use in the inner product.
mRowthe row of the matrix m to use in the inner product.
Returns
the resulting portion of the inner product.

◆ innerProductOct()

template<typename IntType >
IntType regina::LPConstraintBase::Coefficients::innerProductOct ( const LPMatrix< IntType > &  m,
unsigned  mRow 
) const

A variant of innerProduct() that takes into account any adjustments to these linear constraint(s) that are required when this is a quadrilateral column being used to represent an octagon type.

The LPData class offers support for octagonal almost normal surfaces, in which exactly one tetrahedron is allowed to have exactly one octagon type. We represent such an octagon as a pair of incompatible quadrilaterals within the same tetrahedron. See the LPData class notes for details on how this works.

In some settings, our extra linear constraints must behave differently in the presence of octagons (i.e., the coefficient of the octagon type is not just the sum of coefficients of the two constituent quadrilateral types). This routine effectively allows us to adjust the tableaux accordingly.

Specifically: this routine computes the inner product of (i) the final nConstraints entries in the given row of the given matrix with (ii) the nConstraints column coefficients stored in this data structure. We assume that this column in the underlying tableaux describes one of the two quadrilateral coordinates in some tetrahedron that together form an octagon type, and if necessary we implicitly adjust the coefficients stored in this data structure accordingly.

This routine is not used with angle structure coordinates.

Precondition
The given matrix has at least nConstraints columns and at least mRow + 1 rows.
This column of the underlying tableaux describes one of the two quadrilateral coordinates that are being combined to form an octagon type within some tetrahedron.
Parameters
mthe matrix whose row we will use in the inner product.
mRowthe row of the matrix m to use in the inner product.
Returns
the resulting portion of the inner product.

The documentation for this struct 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).