Regina Calculation Engine
|
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... | |
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.
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.
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.
m | the matrix in which to place these column coefficients. |
col | the column of the given matrix in which to place these coefficients. |
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.
m | the matrix whose row we will use in the inner product. |
mRow | the row of the matrix m to use in the inner product. |
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.
m | the matrix whose row we will use in the inner product. |
mRow | the row of the matrix m to use in the inner product. |