Regina Calculation Engine
Classes | Static Public Member Functions
regina::NDoubleDescription Class Reference

Implements a modified double description method for polytope vertex enumeration. More...

#include <enumerate/ndoubledescription.h>

List of all members.

Classes

class  RaySpec
 A helper class for vertex enumeration, describing a single ray (typically a vertex in some partial solution space).

Static Public Member Functions

template<class RayClass , class OutputIterator >
static void enumerateExtremalRays (OutputIterator results, const NMatrixInt &subspace, const NEnumConstraintList *constraints, NProgressNumber *progress=0, unsigned initialRows=0)
 Determines the extremal rays of the intersection of the n-dimensional non-negative orthant with the given linear subspace.

Detailed Description

Implements a modified double description method for polytope vertex enumeration.

For details of the underlying algorithm, see "Optimizing the double description method for normal surface enumeration", Benjamin A. Burton, Math. Comp. 79 (2010), 453-484.

All routines of interest within this class are static; no object of this class should ever be created.

Python:
Not present.
Test:
Included in the test suite.

Member Function Documentation

template<class RayClass , class OutputIterator >
static void regina::NDoubleDescription::enumerateExtremalRays ( OutputIterator  results,
const NMatrixInt subspace,
const NEnumConstraintList constraints,
NProgressNumber progress = 0,
unsigned  initialRows = 0 
)
static

Determines the extremal rays of the intersection of the n-dimensional non-negative orthant with the given linear subspace.

The resulting rays will be of the class RayClass, will be newly allocated, and will be written to the given output iterator. Their deallocation is the responsibility of whoever called this routine.

The non-negative orthant is an n-dimensional cone with its vertex at the origin. The extremal rays of this cone are the n non-negative coordinate axes. This cone also has n facets, where the ith facet is the non-negative orthant of the plane perpendicular to the ith coordinate axis.

This routine takes a linear subspace, defined by the intersection of a set of hyperplanes through the origin (this subspace is described as a matrix, with each row giving the equation for one hyperplane).

The purpose of this routine is to compute the extremal rays of the new cone formed by intersecting the original cone with this linear subspace. The resulting list of extremal rays will contain no duplicates or redundancies.

Parameter constraints may contain a set of validity constraints, in which case this routine will only return valid extremal rays. Each validity constraint is of the form "an extremal ray may only lie outside at most one of these facets of the original cone"; see the NEnumConstraintList class for details. These contraints have the important property that, although validity is not preserved under convex combination, invalidity is.

A numeric progress watcher may be passed for progress reporting. If so, this routine will poll for cancellation requests accordingly.

Precondition:
The template argument RayClass is derived from NRay (or may possibly be NRay itself).
Parameters:
resultsthe output iterator to which the resulting extremal rays will be written; this must accept objects of type RayClass*.
subspacea matrix defining the linear subspace to intersect with the given cone. Each row of this matrix is the equation for one of the hyperplanes whose intersection forms this linear subspace. The number of columns in this matrix must be the dimension of the overall space in which we are working.
constraintsa set of validity constraints as described above, or 0 if no additional constraints should be imposed.
progressa numeric progress watcher through which progress will be reported, or 0 if no progress reporting is required. If a progress watcher is passed, its expected total will be increased immediately by some number of steps and the completed total will be increased gradually by this same number. Note that NProgress::setFinished() will not be called, since whoever called this routine may need to do further processing.
initialRowsspecifies how many initial rows of subspace are to be processed in the precise order in which they appear. The remaining rows will be sorted using the NPosOrder class before they are processed.

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

Copyright © 1999-2012, The Regina development team
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).