Regina 7.3 Calculation Engine
|
A comparison object that sorts hyperplanes by position vectors. More...
#include <enumerate/ordering.h>
Public Member Functions | |
PosOrder (const MatrixInt &matrix) | |
Creates a new helper object for comparing hyperplanes. More... | |
PosOrder (const PosOrder &)=default | |
Creates a clone of the given helper objet. More... | |
bool | operator() (size_t i, size_t j) const |
Determines whether the hyperplane described by row i of the matrix is smaller than the hyperplane described by row j. More... | |
PosOrder & | operator= (const PosOrder &)=delete |
A comparison object that sorts hyperplanes by position vectors.
This ordering is described in "Optimizing the double description method for normal surface enumeration", B.A. Burton, Mathematics of Computation 79 (2010), 453-484.
This comparison object is used to sort hyperplanes into a good order before enumerating vertex or fundamental normal surfaces A hyperplane is described by a row of the subspace matrix, as passed to an enumeration routine such as DoubleDescription::enumerate() or HilbertDual::enumerate().
The ordering is defined as follows. For each hyperplane, we create a position vector (h_1, ..., h_f), where h_i is 0 if the hyperplane contains the ith coordinate axis, or 1 if not. We then compare these position vectors lexicographically.
A PosOrder object behaves like a reference: it is lightweight and can be copy-constructed cheaply, but it does not support assignments or swaps.
|
inline |
Creates a new helper object for comparing hyperplanes.
matrix | the subspace matrix as passed to the normal surface enumeration routine. |
|
default |
Creates a clone of the given helper objet.
|
inline |
Determines whether the hyperplane described by row i of the matrix is smaller than the hyperplane described by row j.
Here "smaller" is defined by position vectors; see the PosOrder class notes for details.
i | the first matrix row index; this must be between 0 and matrix.rows()-1 inclusive, where matrix is the matrix passed to the class constructor. |
j | the second matrix row index; this must also be between 0 and matrix.rows()-1 inclusive. |
true
if and only if the hyperplane described by row i is smaller than the hyperplane described by row j.