|
GraphLibrary
0.0.1
A simple library that implements various graph algorithms.
|
Edge_Iterator class. Used to iterate over all Edges in the Graph More...
#include <Graph.hpp>
Public Types | |
| using | value_type = Edge |
| Edge type. More... | |
| using | reference = std::conditional_t< IsConst, const Edge &, Edge & > |
| Edge reference type. More... | |
| using | pointer = std::conditional_t< IsConst, const Edge *, Edge * > |
| Edge pointer type. More... | |
| using | iterator_category = std::forward_iterator_tag |
| Iterator category. More... | |
| using | difference_type = std::ptrdiff_t |
| Pointer Difference type. More... | |
| using | self_t = Edge_Iterator |
| EdgeIterator type. More... | |
| using | matrix_iterator_t = std::conditional_t< IsConst, typename matrix_t::const_iterator, typename matrix_t::iterator > |
| using | rootList_iterator_t = std::conditional_t< IsConst, typename rootList_t::const_iterator, typename rootList_t::iterator > |
| using | list_iterator_t = std::conditional_t< IsConst, typename nodeList_t::const_iterator, typename nodeList_t::iterator > |
| using | container_pointer_t = std::conditional_t< IsConst, const Graph< SCALAR, STORAGE_KIND, DIRECTION > *, Graph< SCALAR, STORAGE_KIND, DIRECTION > * > |
Public Member Functions | |
| Edge_Iterator () | |
| Default constructor. More... | |
| Edge_Iterator (matrix_iterator_t ptr, matrix_iterator_t data1, container_pointer_t data2) | |
| Construct EdgeIterator, only used with Matrix Representation. More... | |
| Edge_Iterator (list_iterator_t ptr, rootList_iterator_t data1, container_pointer_t data2) | |
| Construct EdgeIterator, only used with List Representation. More... | |
| self_t | operator++ () |
| Move Iterator to next edge (pre-increment) More... | |
| self_t | operator++ (int dummy) |
| Move Iterator to next edge (post-increment) More... | |
| operator* () const | |
| Const dereference iterator. More... | |
| operator* () | |
| Non-const dereference iterator. More... | |
| operator-> () const | |
| Get underlying edge. More... | |
| operator-> () | |
| Get underlying edge. More... | |
| bool | operator== (const self_t &rhs) |
| Check if equal. More... | |
| bool | operator!= (const self_t &rhs) |
| Check if not equal. More... | |
| self_t | operator= (const self_t &rhs) |
| Construct from Assignment. More... | |
Private Attributes | |
| std::conditional_t < std::is_same_v< STORAGE_KIND, Matrix >, matrix_iterator_t, list_iterator_t > | ptr_ |
| [Matrix] Iterator to an element, [List] Iterator over the nodeLists More... | |
| std::conditional_t < std::is_same_v< STORAGE_KIND, Matrix >, matrix_iterator_t, rootList_iterator_t > | data1_ |
| [Matrix] Iterator to first element, [List] Iterator over the rootList More... | |
| container_pointer_t | data2_ |
| Pointer to owner Graph. More... | |
Edge_Iterator class. Used to iterate over all Edges in the Graph
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::value_type = Edge |
Edge type.
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::reference = std::conditional_t<IsConst, const Edge &, Edge &> |
Edge reference type.
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::pointer = std::conditional_t<IsConst, const Edge *, Edge *> |
Edge pointer type.
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::iterator_category = std::forward_iterator_tag |
Iterator category.
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::difference_type = std::ptrdiff_t |
Pointer Difference type.
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::self_t = Edge_Iterator |
EdgeIterator type.
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::matrix_iterator_t = std::conditional_t<IsConst, typename matrix_t::const_iterator, typename matrix_t::iterator> |
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::rootList_iterator_t = std::conditional_t<IsConst, typename rootList_t::const_iterator, typename rootList_t::iterator> |
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::list_iterator_t = std::conditional_t<IsConst, typename nodeList_t::const_iterator, typename nodeList_t::iterator> |
| using gl::Graph< SCALAR, STORAGE_KIND, DIRECTION >::Edge_Iterator< IsConst >::container_pointer_t = std::conditional_t<IsConst, const Graph<SCALAR, STORAGE_KIND, DIRECTION> *, Graph<SCALAR, STORAGE_KIND, DIRECTION> *> |
|
inline |
Default constructor.
|
inline |
Construct EdgeIterator, only used with Matrix Representation.
| [in] | ptr | Pointer to which edge this iterator should point |
| [in] | data1 | pointer to first element in the matrix |
| [in] | data2 | pointer to the owner data structure |
|
inline |
Construct EdgeIterator, only used with List Representation.
| [in] | ptr | Pointer to which edge this iterator should point |
| [in] | data1 | iterator over the root vector |
| [in] | data2 | pointer to the owner data structure |
|
inline |
Move Iterator to next edge (pre-increment)
|
inline |
Move Iterator to next edge (post-increment)
|
inline |
Const dereference iterator.
|
inline |
Non-const dereference iterator.
|
inline |
Get underlying edge.
|
inline |
Get underlying edge.
|
inline |
Check if equal.
|
inline |
Check if not equal.
|
inline |
Construct from Assignment.
|
private |
[Matrix] Iterator to an element, [List] Iterator over the nodeLists
|
private |
[Matrix] Iterator to first element, [List] Iterator over the rootList
|
private |
Pointer to owner Graph.