|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Filtered iterator on the nodes of a graph. More...
#include <tpl_graph.H>
Public Types | |
| using | Itor = Filter_Iterator< GT, typename GT::Node_Iterator, Show_Node > |
| using | Item_Type = typename Itor::Item_Type |
| using | Set_Type = typename Itor::Set_Type |
| The element type: Node*. | |
Public Types inherited from Aleph::Filter_Iterator< Container, It, Show_Item > | |
| using | Item_Type = typename It::Item_Type |
| The type of element returned by get_curr() | |
| using | Iterator_Type = It |
| The type of the base iterator. | |
| using | Container_Type = Container |
| The type of container being iterated. | |
| using | Filter_Type = Show_Item |
| The type of the filter functor. | |
Public Member Functions | |
| Node_Iterator ()=default | |
| The set: the arcs of a graph. | |
| Node_Iterator (const GT &g, Show_Node sn=Show_Node()) | |
Construct a iterator with filter sn | |
Public Member Functions inherited from Aleph::Filter_Iterator< Container, It, Show_Item > | |
| const Container & | get_container () const |
| Returns a const reference to the container being iterated over. | |
| bool | has_container () const noexcept |
| Check if a container has been set. | |
| It & | get_iterator () noexcept |
| Returns a reference to the underlying base iterator. | |
| const It & | get_iterator () const noexcept |
| Returns a const reference to the underlying base iterator. | |
| Show_Item & | get_filter () noexcept |
| Returns a reference to the filter functor. | |
| const Show_Item & | get_filter () const noexcept |
| Returns a const reference to the filter functor. | |
| void | set_filter (Show_Item si) |
| Sets a new filter functor. | |
| void | set_cookie (void *__cookie) noexcept |
| Sets the cookie pointer. | |
| void * | get_cookie () const noexcept |
| Gets the cookie pointer. | |
| Filter_Iterator (Show_Item si=Show_Item()) noexcept | |
| Default constructor. | |
| Filter_Iterator (const Container &c, Show_Item si=Show_Item()) | |
| Constructs a filter iterator over a container. | |
| Filter_Iterator (const Container &c, void *__cookie, Show_Item si=Show_Item()) | |
| Constructs a filter iterator with a cookie. | |
| void | next () |
| Advances the iterator to the next filtered element. | |
| void | next_ne () noexcept |
| Advances the iterator to the next filtered element (noexcept version). | |
| void | prev () |
| Moves the iterator backward to the previous filtered element. | |
| void | prev_ne () noexcept |
| Moves the iterator backward (noexcept version). | |
| void | reset_first () |
| Resets the iterator to the first filtered element. | |
| void | reset_last () |
| Resets the iterator to the last filtered element. | |
| size_t | count () |
| Count the number of elements that pass the filter. | |
| bool | empty () |
| Check if there are no elements that pass the filter. | |
| template<typename Op > | |
| void | for_each (Op op) |
| Apply a function to all filtered elements. | |
| template<typename Pred > | |
| bool | find_if (Pred pred) |
| Find the first element that satisfies an additional predicate. | |
Filtered iterator on the nodes of a graph.
Definition at line 1204 of file tpl_graph.H.
Definition at line 1210 of file tpl_graph.H.
| using Aleph::Node_Iterator< GT, Show_Node >::Itor = Filter_Iterator<GT, typename GT::Node_Iterator, Show_Node> |
Definition at line 1208 of file tpl_graph.H.
| using Aleph::Node_Iterator< GT, Show_Node >::Set_Type = typename Itor::Set_Type |
The element type: Node*.
Definition at line 1212 of file tpl_graph.H.
|
default |
The set: the arcs of a graph.
|
inline |
Construct a iterator with filter sn
| [in] | g | the graph |
| [in] | sn | the node filter |
Definition at line 1221 of file tpl_graph.H.