Regina Calculation Engine
Public Member Functions | List of all members
regina::graph::AdjacentDualVertexIterator< dim > Class Template Reference

Used to iterate through the dual vertices adjacent to a given dual vertex of a dim-dimensional triangulation. More...

#include <triangulation/graph.h>

Public Member Functions

 AdjacentDualVertexIterator ()
 Default constructor that performs no initialisation. More...
 
 AdjacentDualVertexIterator (Simplex< dim > *source, unsigned facet=0)
 Creates a new iterator that runs through all dual vertices adjacent to the given dual vertex. More...
 
 AdjacentDualVertexIterator (const AdjacentDualVertexIterator &)=default
 Default copy constructor. More...
 
AdjacentDualVertexIteratoroperator++ ()
 Preincrement operator. More...
 
AdjacentDualVertexIterator operator++ (int)
 Postincrement operator. More...
 
Simplex< dim > * operator* () const
 Returns the dual vertex (that is, the top-dimensional simplex) to which this iterator points. More...
 
AdjacentDualVertexIteratoroperator= (const AdjacentDualVertexIterator &)=default
 Default assignment operator. More...
 
bool operator== (const AdjacentDualVertexIterator &rhs) const
 Tests whether this and the given iterator are equal. More...
 
bool operator!= (const AdjacentDualVertexIterator &rhs) const
 Tests whether this and the given iterator are different. More...
 

Detailed Description

template<int dim>
class regina::graph::AdjacentDualVertexIterator< dim >

Used to iterate through the dual vertices adjacent to a given dual vertex of a dim-dimensional triangulation.

Let v denote the given dual vertex; note that v corresponds to a top-dimensional simplex of the triangulation. The order of iteration will follow those dual vertices that are adjacent through facets 0, 1, ..., dim of this simplex in turn. Note however that the range of iterators may be smaller than (dim+1), since an iterator will skip past those facets of the simplex that lie on the boundary of the triangulation.

This class implements the Boost multipass input iterator concept, which is similar to the standard C++ forward iterator except that the reference type may be the same as value_type (and so, in particular, the dereference operator may return by value). This header also specialises std::iterator_traits for this iterator type.

Template Parameters
dimthe dimension of the underlying triangulation.

Constructor & Destructor Documentation

◆ AdjacentDualVertexIterator() [1/3]

Default constructor that performs no initialisation.

◆ AdjacentDualVertexIterator() [2/3]

template<int dim>
regina::graph::AdjacentDualVertexIterator< dim >::AdjacentDualVertexIterator ( Simplex< dim > *  source,
unsigned  facet = 0 
)
inline

Creates a new iterator that runs through all dual vertices adjacent to the given dual vertex.

The given dual vertex is specified by passing the corresponding top-dimensional simplex source in the underlying triangulation.

The iterator will begin at the dual vertex (i.e., top-domensional simplex) attached to facet number facet of simp, assuming that one exists. However, if this is a boundary facet of the triangulation, then the iterator will skip forward through the list of facets until it either locates an internal facet (with a simplex on the other side), or moves past-the-end (facet number dim+1).

Parameters
sourcethe dual vertex (i.e., top-dimensional simplex) whose adjacent dual vertices we are iterating through.
facetindicates the facet of simp at which the iteration should begin. This must be between 0 and (dim+1) inclusive, where a value of (dim+1) indicates an iterator that is past-the-end.

◆ AdjacentDualVertexIterator() [3/3]

Default copy constructor.

Member Function Documentation

◆ operator!=()

template<int dim>
bool regina::graph::AdjacentDualVertexIterator< dim >::operator!= ( const AdjacentDualVertexIterator< dim > &  rhs) const
inline

Tests whether this and the given iterator are different.

Parameters
rhsthe iterator to compare with this.
Returns
true if and only if the two iterators are different.

◆ operator*()

template<int dim>
Simplex< dim > * regina::graph::AdjacentDualVertexIterator< dim >::operator*
inline

Returns the dual vertex (that is, the top-dimensional simplex) to which this iterator points.

Precondition
This iterator is not past-the-end.
Returns
the dual vertex to which this iterator points.

◆ operator++() [1/2]

template<int dim>
AdjacentDualVertexIterator< dim > & regina::graph::AdjacentDualVertexIterator< dim >::operator++
inline

Preincrement operator.

Returns
a reference to this iterator.

◆ operator++() [2/2]

template<int dim>
AdjacentDualVertexIterator< dim > regina::graph::AdjacentDualVertexIterator< dim >::operator++ ( int  )
inline

Postincrement operator.

Returns
a copy of this iterator before it was incremented.

◆ operator=()

template<int dim>
AdjacentDualVertexIterator& regina::graph::AdjacentDualVertexIterator< dim >::operator= ( const AdjacentDualVertexIterator< dim > &  )
default

Default assignment operator.

Returns
a reference to this iterator.

◆ operator==()

template<int dim>
bool regina::graph::AdjacentDualVertexIterator< dim >::operator== ( const AdjacentDualVertexIterator< dim > &  rhs) const
inline

Tests whether this and the given iterator are equal.

Parameters
rhsthe iterator to compare with this.
Returns
true if and only if the two iterators are equal.

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

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