Regina 7.3 Calculation Engine
Public Member Functions | List of all members
regina::PosOrder Class Reference

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...
 
PosOrderoperator= (const PosOrder &)=delete
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PosOrder() [1/2]

regina::PosOrder::PosOrder ( const MatrixInt matrix)
inline

Creates a new helper object for comparing hyperplanes.

Parameters
matrixthe subspace matrix as passed to the normal surface enumeration routine.

◆ PosOrder() [2/2]

regina::PosOrder::PosOrder ( const PosOrder )
default

Creates a clone of the given helper objet.

Member Function Documentation

◆ operator()()

bool regina::PosOrder::operator() ( size_t  i,
size_t  j 
) const
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.

Parameters
ithe first matrix row index; this must be between 0 and matrix.rows()-1 inclusive, where matrix is the matrix passed to the class constructor.
jthe second matrix row index; this must also be between 0 and matrix.rows()-1 inclusive.
Returns
true if and only if the hyperplane described by row i is smaller than the hyperplane described by row j.

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

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