regina::NFacetSpec< dim > Struct Template Reference
Generic code

A lightweight class used to refer to a particular facet of a particular simplex in a triangulation. More...

`#include <generic/nfacetspec.h>`

## Public Member Functions

| NFacetSpec ()
| Creates a new specifier with no initialisation. More...
| NFacetSpec (int newSimp, int newFacet)
| Creates a new specifier referring to the given facet of the given simplex. More...
| NFacetSpec (const NFacetSpec< dim > &cloneMe)
| Creates a new specifier referring to the same simplex facet as the given specifier. More...
bool | isBoundary (unsigned nSimplices) const
| Determines if this specifier represents the overall boundary. More...
bool | isBeforeStart () const
| Determines if this specifier represents a before-the-start value. More...
bool | isPastEnd (unsigned nSimplices, bool boundaryAlso) const
| Determines if this specifier represents a past-the-end value. More...
void | setFirst ()
| Sets this specifier to the first facet of the first simplex. More...
void | setBoundary (unsigned nSimplices)
| Sets this specifier to the overall boundary. More...
void | setBeforeStart ()
| Sets this specifier to before-the-start. More...
void | setPastEnd (unsigned nSimplices)
| Sets this specifier to past-the-end. More...
NFacetSpec & | operator= (const NFacetSpec< dim > &other)
| Sets this specifier to the value of the given specifier. More...
NFacetSpec | operator++ ()
| Increments this specifier. More...
NFacetSpec | operator++ (int)
| Increments this specifier. More...
NFacetSpec | operator-- ()
| Decrements this specifier. More...
NFacetSpec | operator-- (int)
| Decrements this specifier. More...
bool | operator== (const NFacetSpec< dim > &other) const
| Determines if this and the given specifier are identical. More...
bool | operator< (const NFacetSpec< dim > &other) const
| Determines if this is less than the given specifier. More...
bool | operator<= (const NFacetSpec< dim > &other) const
| Determines if this is less than or equal to the given specifier. More...

## Public Attributes

int | simp
| The simplex referred to. More...
int | facet
| The facet of the simplex referred to. More...

## Detailed Description

### template<int dim>
struct regina::NFacetSpec< dim >

A lightweight class used to refer to a particular facet of a particular simplex in a triangulation.

Only the simplex index and the facet number are stored.

The template parameter gives the dimension of the triangulation (so for dimension three, this class describes a face of a tetrahedron, and for dimension four it describes a facet of a pentachoron).

Facilities are provided for iterating through simplex facets. With this in mind, it is also possible to represent the overall boundary, a past-the-end value and a before-the-start value.

When iterating through the simplex facets, the facets will be ordered first by simplex index and then by facet number. The overall boundary appears after all other simplex facets.

If there are n simplices, the simplices will be numbered from 0 to n-1 inclusive. The boundary will be represented as simplex n, facet 0. The past-the-end value will be represented as simplex n, facet 1, and the before-the-start value will be represented as simplex -1, facet dim.

Python:
  The generic template NFacetSpec is not available to Python users, although the special 3-dimensional case NTetFace is. All Python notes in this class refer to the special case NTetFace only.

## Constructor & Destructor Documentation

template<int dim>

regina::NFacetSpec< dim >::NFacetSpec | ( |  | ) |

inline

Creates a new specifier with no initialisation.

This specifier must be initialised before it is used.

template<int dim>

regina::NFacetSpec< dim >::NFacetSpec | ( | int | newSimp,
|  | int | newFacet
| ) |  |

inline

Creates a new specifier referring to the given facet of the given simplex.

Parameters

  newSimp | the given simplex; see the class notes for allowable values of this parameter.
  newFacet | the given facet; this should be between 0 and dim inclusive.

template<int dim>

regina::NFacetSpec< dim >::NFacetSpec | ( | const NFacetSpec< dim > & | cloneMe | ) |

inline

Creates a new specifier referring to the same simplex facet as the given specifier.

Parameters

  cloneMe | the specifier to clone.

## Member Function Documentation

template<int dim>

bool regina::NFacetSpec< dim >::isBeforeStart | ( |  | ) | const

inline

Determines if this specifier represents a before-the-start value.

Returns
  `true` if and only if this specifier is before-the-start.

template<int dim>

bool regina::NFacetSpec< dim >::isBoundary | ( | unsigned | nSimplices | ) | const

inline

Determines if this specifier represents the overall boundary.

Parameters

  nSimplices | the number of simplices under consideration. Note that the boundary is represented in this specifier as simplex nSimplices, facet 0.

Returns
  `true` if and only if this specifier represents the overall boundary.

template<int dim>

bool regina::NFacetSpec< dim >::isPastEnd | ( | unsigned | nSimplices,
|  | bool | boundaryAlso
| ) |  | const

inline

Determines if this specifier represents a past-the-end value.

You can optionally declare the overall boundary to be past-the-end as well as the already predefined past-the-end value.

Parameters

  nSimplices | the number of simplices under consideration. Note that past-the-end is represented in this specifier as simplex nSimplices, facet 1.
  boundaryAlso | `true` if the overall boundary should be considered past-the-end in addition to the predefined past-the-end value.

Returns
  `true` if and only if this specifier is past-the-end.

template<int dim>

NFacetSpec< dim > regina::NFacetSpec< dim >::operator++ | ( |  | ) |

inline

Increments this specifier.

It will be changed to point to the next simplex facet.

Facets are ordered first by simplex index and then by facet number. The overall boundary appears after all other facets.

Precondition
  This specifier is not past-the-end.

Python:
  Not present, although the preincrement operator is present in python as the member function inc().

Returns
  A copy of this specifier after it has been incremented.

template<int dim>

NFacetSpec< dim > regina::NFacetSpec< dim >::operator++ | ( | int |  | ) |

inline

Increments this specifier.

It will be changed to point to the next simplex facet.

Facets are ordered first by simplex index and then by facet number. The overall boundary appears after all other facets.

Precondition
  This specifier is not past-the-end.

Python:
  This routine is named inc() since python does not support the increment operator.

Returns
  A copy of this specifier before it was incremented.

template<int dim>

NFacetSpec< dim > regina::NFacetSpec< dim >::operator-- | ( |  | ) |

inline

Decrements this specifier.

It will be changed to point to the previous simplex facet.

Facets are ordered first by simplex index and then by facet number. The overall boundary appears after all other facets.

Precondition
  This specifier is not before-the-start.

Python:
  Not present, although the predecrement operator is present in python as the member function dec().

Returns
  A copy of this specifier after it has been decremented.

template<int dim>

NFacetSpec< dim > regina::NFacetSpec< dim >::operator-- | ( | int |  | ) |

inline

Decrements this specifier.

It will be changed to point to the previous simplex facet.

Facets are ordered first by simplex index and then by facet number. The overall boundary appears after all other facets.

Precondition
  This specifier is not before-the-start.

Python:
  This routine is named dec() since python does not support the decrement operator.

Returns
  A copy of this specifier before it was decremented.

template<int dim>

bool regina::NFacetSpec< dim >::operator< | ( | const NFacetSpec< dim > & | other | ) | const

inline

Determines if this is less than the given specifier.

Parameters

  other | the specifier to compare with this.

Returns
  `true` if and only if this is less than the given specifier.

template<int dim>

bool regina::NFacetSpec< dim >::operator<= | ( | const NFacetSpec< dim > & | other | ) | const

inline

Determines if this is less than or equal to the given specifier.

Parameters

  other | the specifier to compare with this.

Returns
  `true` if and only if this is less than or equal to the given specifier.

template<int dim>

NFacetSpec< dim > & regina::NFacetSpec< dim >::operator= | ( | const NFacetSpec< dim > & | other | ) |

inline

Sets this specifier to the value of the given specifier.

Parameters

  other | the given specifier.

Returns
  a reference to this specifier.

template<int dim>

bool regina::NFacetSpec< dim >::operator== | ( | const NFacetSpec< dim > & | other | ) | const

inline

Determines if this and the given specifier are identical.

Parameters

  other | the specifier to compare with this.

Returns
  `true` if and only if this and the given specifier are equal.

template<int dim>

void regina::NFacetSpec< dim >::setBeforeStart | ( |  | ) |

inline

Sets this specifier to before-the-start.

template<int dim>

void regina::NFacetSpec< dim >::setBoundary | ( | unsigned | nSimplices | ) |

inline

Sets this specifier to the overall boundary.

Parameters

  nSimplices | the number of simplices under consideration. Note that the boundary is represented in this specifier as simplex nSimplices, facet 0.

template<int dim>

void regina::NFacetSpec< dim >::setFirst | ( |  | ) |

inline

Sets this specifier to the first facet of the first simplex.

template<int dim>

void regina::NFacetSpec< dim >::setPastEnd | ( | unsigned | nSimplices | ) |

inline

Sets this specifier to past-the-end.

Parameters

  nSimplices | the number of simplices under consideration. Note that past-the-end is represented in this specifier as simplex nSimplices, facet 1.

## Member Data Documentation

template<int dim>

int regina::NFacetSpec< dim >::facet

The facet of the simplex referred to.

The facet number is between 0 and dim inclusive.

template<int dim>

int regina::NFacetSpec< dim >::simp

The simplex referred to.

Simplex numbering begins at 0.

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

- generic/nfacetspec.h

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