Regina 7.3 Calculation Engine
Public Member Functions | List of all members
regina::DegreeGreaterThan< dim, subdim > Class Template Reference

Deprecated function object used for sorting faces of triangulations by decreasing degree. More...

#include <triangulation/generic/triangulation.h>

Public Member Functions

 DegreeGreaterThan (const Triangulation< dim > &tri)
 Constructions a function object for working with faces of the given triangulation. More...
 
 DegreeGreaterThan (const DegreeGreaterThan &)=default
 Creates a new clone of the given function object. More...
 
bool operator() (unsigned a, unsigned b) const
 Compares the degrees of the subdim-dimensional faces at the given indices within the working triangulation. More...
 
DegreeGreaterThanoperator= (const DegreeGreaterThan &)=delete
 

Detailed Description

template<int dim, int subdim>
class regina::DegreeGreaterThan< dim, subdim >

Deprecated function object used for sorting faces of triangulations by decreasing degree.

This can (for instance) be used with std::sort().

The template argument dim refers to the dimension of the overall triangluation(s) with which you are working. The template argument subdim refers to the dimension of the faces that you are sorting. So, for instance, to sort edges of a 3-manifold triangulation by decreasing edge degree, you would use DegreeGreaterThan<3, 1>.

A single instance of this class works with faces of a single fixed triangulation (which is passed to the class constructor).

An object of this class behaves like a reference: it is lightweight and can be copy-constructed cheaply, but it does not support assignments or swaps.

Deprecated:
This comparison is a one-liner. Just use a lambda instead.
Python
Not present.
Precondition
dim is one of Regina's standard dimensions.
subdim is between 0 and dim-1 inclusive.

Constructor & Destructor Documentation

◆ DegreeGreaterThan() [1/2]

template<int dim, int subdim>
regina::DegreeGreaterThan< dim, subdim >::DegreeGreaterThan ( const Triangulation< dim > &  tri)
inline

Constructions a function object for working with faces of the given triangulation.

Parameters
trithe triangulation with which we are working.

◆ DegreeGreaterThan() [2/2]

template<int dim, int subdim>
regina::DegreeGreaterThan< dim, subdim >::DegreeGreaterThan ( const DegreeGreaterThan< dim, subdim > &  )
default

Creates a new clone of the given function object.

Member Function Documentation

◆ operator()()

template<int dim, int subdim>
bool regina::DegreeGreaterThan< dim, subdim >::operator() ( unsigned  a,
unsigned  b 
) const
inline

Compares the degrees of the subdim-dimensional faces at the given indices within the working triangulation.

The triangulation that is used will be the one that was passed to the class constructor.

Precondition
Both a and b are non-negative, and are strictly less than the total number of subdim-dimensional faces in the triangulation.
Parameters
athe index of the first subdim-dimensional face within the triangulation.
bthe index of the second subdim-dimensional face within the triangulation.
Returns
true if and only if face a has greater degree than face b within the given triangulation.

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).