template<unsigned int n_dofs_per_nodeT, class TopoT, class GeomT, class NodeT, class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
class HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator
Iterator for struct
hyEdge
returned by operator
[].
Iterator that allows to go through the hyperedges of a hypergraph forwards and backwards. This iterator fulfills the preconditions to allow the use of std::for_each
on the set of hyperedges that are contained in the HDGHyperGraph
.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator::iterator |
( |
HDGHyperGraph & |
hyGraph, |
|
|
const hyEdge_index_t |
index |
|
) |
| |
|
inline |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator::iterator |
( |
const iterator & |
other | ) |
|
|
inline |
Copy–construct an iterator from another iterator.
Construct HDGHyperGraph::iterator
as copy of another one.
- Parameters
-
other | Other iterator which is copied. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
Dereference iterator
to hyEdge
.
This function dereferences the iterator and returns the hyEdge
this iterator dots at.
- Return values
-
hyEdge | The hyperedge described by the iterator. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
iterator& HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator::operator++ |
( |
| ) |
|
|
inline |
Increment iterator and return incremented iterator.
This function incements the iterator and returns the incremented iterator. Thus, no new iterator needs to be constructed and only a reference needs to be returned. This makes the function more performant compared to iterator
operator++(int)
. It is executed using ++iterator
and not iterator++
.
- Return values
-
incemented | The incremented iterator. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
iterator HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator::operator++ |
( |
int |
| ) |
|
|
inline |
Increment iterator and return old iterator.
This function incements the iterator and returns the old iterator. Thus, a new iterator needs to be constructed and only a reference needs to be returned. This makes the function less performant compared to iterator
operator++()
. It is executed using iterator++
and not ++iterator
.
- Return values
-
incemented | The incremented iterator. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
iterator& HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator::operator-- |
( |
| ) |
|
|
inline |
Decrement iterator and return incremented iterator.
This function decements the iterator and returns the decremented iterator. Thus, no new iterator needs to be constructed and only a reference needs to be returned. This makes the function more performant compared to iterator
operator--(int)
. It is executed using –iterator
and not iterator–
.
- Return values
-
decemented | The decremented iterator. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
iterator HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator::operator-- |
( |
int |
| ) |
|
|
inline |
Decrement iterator and return old iterator.
This function decements the iterator and returns the old iterator. Thus, a new iterator needs to be constructed and only a reference needs to be returned. This makes the function less performant compared to iterator
operator--()
. It is executed using iterator–
and not –iterator
.
- Return values
-
decemented | The decremented iterator. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
Copy–assign an iterator from another iterator.
Asign a given HDGHyperGraph::iterator
to be a copy of another one
- Parameters
-
other | Other iterator which is copied. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
bool HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator::operator== |
( |
const iterator & |
other | ) |
|
|
inline |
Check for equality with another iterator.
This function checks whether the current iterator is equal to anoother iterator
. In this context equal means that they refer to the same HDGHyperGraph
and have the same index.
- Parameters
-
other | iterator which is checked to be equal. |
- Return values
-
is_equal | boolean which is true if both iterators are equal and false otherwise. |
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
Reference to the HDGHyperGraph
of the iterator.
The hyEdge
is characterized via its respective HDGHypergraph
(of which the reference is saved) and its index who need to be members of the iterator
.
template<unsigned int n_dofs_per_nodeT, class TopoT , class GeomT , class NodeT , class DataT = EmptyC, typename hyEdge_index_t = unsigned int>
hyEdge_index_t HDGHyperGraph< n_dofs_per_nodeT, TopoT, GeomT, NodeT, DataT, hyEdge_index_t >::iterator::index_ |
|
private |
Index of the hyEdge
of the iterator.
The hyEdge
is characterized via its respective HDGHypergraph
(of which the reference is saved) and its index who need to be members of the iterator
.