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

Used to iterate through all dual edges incident to a given dual vertex of a dim-dimensional triangulation. More...

#include <triangulation/graph.h>

Public Member Functions

 IncidentDualEdgeIterator ()
 Creates a singular iterator. More...
 
 IncidentDualEdgeIterator (Simplex< dim > *simp, unsigned facet=0)
 Creates a new iterator that runs through all dual edges incident to the given dual vertex. More...
 
 IncidentDualEdgeIterator (const IncidentDualEdgeIterator &)=default
 Default copy constructor. More...
 
IncidentDualEdgeIteratoroperator++ ()
 Preincrement operator. More...
 
IncidentDualEdgeIterator operator++ (int)
 Postincrement operator. More...
 
DualEdge< dim > operator* () const
 Returns the dual edge to which this iterator points. More...
 
IncidentDualEdgeIteratoroperator= (const IncidentDualEdgeIterator &)=default
 Default assignment operator. More...
 
bool operator== (const IncidentDualEdgeIterator &rhs) const
 Tests whether this and the given iterator are equal. More...
 
bool operator!= (const IncidentDualEdgeIterator &rhs) const
 Tests whether this and the given iterator are different. More...
 

Detailed Description

template<int dim, bool out>
class regina::graph::IncidentDualEdgeIterator< dim, out >

Used to iterate through all dual edges incident to a given dual vertex of a dim-dimensional triangulation.

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

When an IncidentDualEdgeIterator is dereferenced, the resulting dual edge must be given an orientation (as required by the DualEdge class). This orientation is determined by the template parameter out. If out is true then the dual edges will be oriented away from the dual vertex v (so v is the source), and if out is false then they will be oriented towards v (so v is the target).

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.
outindicates the orientation that will be assigned to the incident dual edges, as described above.

Constructor & Destructor Documentation

◆ IncidentDualEdgeIterator() [1/3]

template<int dim, bool out>
regina::graph::IncidentDualEdgeIterator< dim, out >::IncidentDualEdgeIterator
inline

Creates a singular iterator.

◆ IncidentDualEdgeIterator() [2/3]

template<int dim, bool out>
regina::graph::IncidentDualEdgeIterator< dim, out >::IncidentDualEdgeIterator ( Simplex< dim > *  simp,
unsigned  facet = 0 
)
inline

Creates a new iterator that runs through all dual edges incident to the given dual vertex.

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

The iterator will begin at the dual edge passing through facet number facet of simp, assuming there is a simplex on the other side. However, if that 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
simpthe dual vertex (i.e., top-dimensional simplex) whose incident dual edges 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.

◆ IncidentDualEdgeIterator() [3/3]

template<int dim, bool out>
regina::graph::IncidentDualEdgeIterator< dim, out >::IncidentDualEdgeIterator ( const IncidentDualEdgeIterator< dim, out > &  )
default

Default copy constructor.

Member Function Documentation

◆ operator!=()

template<int dim, bool out>
bool regina::graph::IncidentDualEdgeIterator< dim, out >::operator!= ( const IncidentDualEdgeIterator< dim, out > &  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, bool out>
DualEdge< dim > regina::graph::IncidentDualEdgeIterator< dim, out >::operator*
inline

Returns the dual edge to which this iterator points.

Suppose we are iterating through dual edges incident to the dual vertex V. If the template parameter out is true then the resulting dual edge will be oriented away from V (so V is the source), and if out is false then the dual edge will be oriented towards V (so V is the target).

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

◆ operator++() [1/2]

template<int dim, bool out>
IncidentDualEdgeIterator< dim, out > & regina::graph::IncidentDualEdgeIterator< dim, out >::operator++
inline

Preincrement operator.

Returns
a reference to this iterator.

◆ operator++() [2/2]

template<int dim, bool out>
IncidentDualEdgeIterator< dim, out > regina::graph::IncidentDualEdgeIterator< dim, out >::operator++ ( int  )
inline

Postincrement operator.

Returns
a copy of this iterator before it was incremented.

◆ operator=()

template<int dim, bool out>
IncidentDualEdgeIterator& regina::graph::IncidentDualEdgeIterator< dim, out >::operator= ( const IncidentDualEdgeIterator< dim, out > &  )
default

Default assignment operator.

Returns
a reference to this iterator.

◆ operator==()

template<int dim, bool out>
bool regina::graph::IncidentDualEdgeIterator< dim, out >::operator== ( const IncidentDualEdgeIterator< dim, out > &  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-2018, 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).