Regina Calculation Engine
Public Member Functions | Public Attributes | List of all members
regina::graph::DualEdge< dim > Struct Template Reference

A lightweight object that denotes an oriented edge of the dual graph of a dim-dimensional triangulation. More...

#include <triangulation/graph.h>

Public Member Functions

 DualEdge (const Face< dim, dim-1 > *face_=nullptr, bool forward_=true)
 Creates a new object denoting a dual edge. More...
 
 DualEdge (const DualEdge &)=default
 Default copy constructor. More...
 
DualEdgeoperator= (const DualEdge &)=default
 Default assignment operator. More...
 
bool operator== (const DualEdge &rhs) const
 Determines whether this and the given dual edge object are equal. More...
 
bool operator!= (const DualEdge &rhs) const
 Determines whether this and the given dual edge object are not equal. More...
 
Simplex< dim > * source () const
 Returns the dual vertex at the beginning of this directed dual edge. More...
 
Simplex< dim > * target () const
 Returns the dual vertex at the end of this directed dual edge. More...
 

Public Attributes

Face< dim, dim-1 > const * face
 The (dim-1)-face of the underlying triangulation that this edge is dual to. More...
 
bool forward
 A dual edge joins two dim-simplices: face->embedding(0).simplex() and face->embedding(1).simplex(). More...
 

Detailed Description

template<int dim>
struct regina::graph::DualEdge< dim >

A lightweight object that denotes an oriented edge of the dual graph of a dim-dimensional triangulation.

Although the underlying graph is undirected, some concepts from the Boost Graph Library (e.g., the source() and target() functions for a bidirectional graph) require that edges come with an orientation.

As a result, the same dual edge may appear with different orientations depending upon how it was obtained. For example, when iterating through incident edges to a vertex using in_edges() or out_edges(), the same dual edge will appear with opposite orientations depending upon which of its endpoints was used for the iteration.

Warning
If the underlying triangulation changes, then all DualEdge and DualEdgeIterator objects will become invalid.
Template Parameters
dimthe dimension of the underlying triangulation.

Constructor & Destructor Documentation

◆ DualEdge() [1/2]

template<int dim>
regina::graph::DualEdge< dim >::DualEdge ( const Face< dim, dim-1 > *  face_ = nullptr,
bool  forward_ = true 
)
inline

Creates a new object denoting a dual edge.

Parameters
face_the (dim-1)-face of the underlying triangulation to which the edge is dual.
forward_indicates how the dual edge is directed, as explained in the forward data member docuemntation.

◆ DualEdge() [2/2]

template<int dim>
regina::graph::DualEdge< dim >::DualEdge ( const DualEdge< dim > &  )
default

Default copy constructor.

Member Function Documentation

◆ operator!=()

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

Determines whether this and the given dual edge object are not equal.

See the equality test (operator ==) for details on what it means for two dual edge objects to be considered equal.

Parameters
rhsthe dual edge object to compare with this.
Returns
true if and only if the two dual edges are not equal.

◆ operator=()

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

Default assignment operator.

◆ operator==()

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

Determines whether this and the given dual edge object are equal.

Two dual edge objects are considered equal if and only if: (i) they are dual to the same (dim-1)-face of the triangulation; and (ii) they are directed in the same way.

In particular, two parallel edges that are dual to different (dim-1)-faces are considered unequal. Likewise, edges that are dual to the same (dim-1)-face but oriented in opposite directions are also considered unequal.

Parameters
rhsthe dual edge object to compare with this.
Returns
true if and only if the two dual edges are equal, as described above.

◆ source()

template<int dim>
Simplex< dim > * regina::graph::DualEdge< dim >::source
inline

Returns the dual vertex at the beginning of this directed dual edge.

A directed dual edge begins at source() and ends at target().

Note that a dual vertex corresponds to a top-dimensional simplex of the underlying triangulation.

Returns
the top-dimensional simplex corresponding to the dual vertex at the beginning of this dual edge.

◆ target()

template<int dim>
Simplex< dim > * regina::graph::DualEdge< dim >::target
inline

Returns the dual vertex at the end of this directed dual edge.

A directed dual edge begins at source() and ends at target().

Note that a dual vertex corresponds to a top-dimensional simplex of the underlying triangulation.

Returns
the top-dimensional simplex corresponding to the dual vertex at the end of this dual edge.

Member Data Documentation

◆ face

template<int dim>
Face<dim, dim-1> const* regina::graph::DualEdge< dim >::face

The (dim-1)-face of the underlying triangulation that this edge is dual to.

◆ forward

template<int dim>
bool regina::graph::DualEdge< dim >::forward

A dual edge joins two dim-simplices: face->embedding(0).simplex() and face->embedding(1).simplex().

This data member forward is true if the dual edge is directed from the first simplex to the second, or false if the dual edge is directed from the second simplex back to the first.


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

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