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

A comparison object that sorts hyperplanes by position vectors. More...

#include <enumerate/ordering.h>

Public Member Functions

 NPosOrder (const NMatrixInt &matrix)
 Creates a new helper object for comparing hyperplanes. More...
 
bool operator() (long i, long j) const
 Determines whether the hyperplane described by row i of the matrix is smaller than the hyperplane described by row j. More...
 

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 NDoubleDescription::enumerateExtremalRays() or NHilbertDual::enumerateHilbertBasis().

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.

Python:
Not present.

Constructor & Destructor Documentation

regina::NPosOrder::NPosOrder ( const NMatrixInt matrix)
inline

Creates a new helper object for comparing hyperplanes.

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

Member Function Documentation

bool regina::NPosOrder::operator() ( long  i,
long  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 NPosOrder 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-2014, 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@debian.org).