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

Stores the list of all subdim-faces of a dim-dimensional triangulation. More...

#include <triangulation/generic.h>

Inheritance diagram for regina::FaceList< dim, subdim >:
regina::detail::FaceListSuite< dim, dim - 1 > regina::detail::FaceListSuite< dim, subdim > regina::detail::TriangulationBase< dim > regina::detail::TriangulationBase< 2 > regina::detail::TriangulationBase< 3 > regina::detail::TriangulationBase< 4 > regina::Triangulation< dim > regina::Triangulation< dim-1 > regina::Triangulation< 2 > regina::Triangulation< 3 > regina::Triangulation< 4 > regina::SnapPeaTriangulation

Public Types

typedef std::vector< Face< dim, subdim > * >::const_iterator Iterator
 An iterator type for iterating through this list of faces. More...
 

Public Member Functions

 FaceList (const FaceList &)=delete
 Explicitly disable the copy constructor. More...
 
FaceListoperator= (const FaceList &)=delete
 Explicitly disable the assignment operator. More...
 
size_t size () const
 Returns the number of subdim-faces in the triangulation. More...
 
Face< dim, subdim > * operator[] (size_t index) const
 Returns the requested subdim-face. More...
 
Iterator begin () const
 Returns an iterator pointing to the first subdim-face. More...
 
Iterator end () const
 Returns an iterator pointing beyond the last subdim-face. More...
 

Protected Member Functions

 FaceList ()=default
 Creates an empty list of subdim-faces. More...
 
void push_back (Face< dim, subdim > *face)
 Pushes the given face onto the end of this list. More...
 
void destroy ()
 Destroys all faces in this list, and clears the list itself. More...
 
void swap (FaceList< dim, subdim > &other)
 Swaps all faces in this list with those in the given list. More...
 
bool sameDegrees (const FaceList< dim, subdim > &other) const
 Tests whether this and the given triangulation have the same subdim-face degree sequences. More...
 
template<typename Iterator >
void reorderFaces (Iterator begin, Iterator end)
 Reorders this list of faces. More...
 

Detailed Description

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

Stores the list of all subdim-faces of a dim-dimensional triangulation.

This object provides basic container-like behaviour. It supports begin(), end(), size(), and the random access operator []. In particular, you can iterate through all subdim-faces using C++11 range-based for loops: for (auto f : faceList) { ... }.

Strictly speaking, this list holds pointers to Face<dim, subdim> objects. So, for example, dereferencing an iterator will return a pointer of type Face<dim, subdim>*. Likewise, the variable f in the range-based for loop above will be a pointer of type Face<dim, subdim>*.

The routine Face::index() will always return the index of the corresponding face in this list.

Warning
Face objects are highly temporary: whenever a triangulation changes, all its face objects will be deleted and new ones will be created in their place.
Template Parameters
dimthe dimension of the underlying triangulation. This must be between 2 and 15 inclusive.
subdimthe dimension of the faces that this class stores. This must be between 0 and dim-1 inclusive.

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

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