Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Digraph_Iterator< GT, Filter > Class Template Reference

Filtered iterator on directed graphs. More...

#include <tpl_graph.H>

Inheritance diagram for Aleph::Digraph_Iterator< GT, Filter >:
[legend]
Collaboration diagram for Aleph::Digraph_Iterator< GT, Filter >:
[legend]

Public Types

using Item_Type = typename Itor::Item_Type
 
using Iterator_Type = Itor
 The type of element.
 

Public Member Functions

 Digraph_Iterator (typename GT::Node *p)
 Iterator type.
 
void next ()
 Move the iterator one position forward.
 
void next_ne () noexcept
 
void prev ()
 Move the iterator one position backward.
 
bool has_curr () const noexcept
 Return true the iterator has an current arc.
 
GT::Arcget_curr () const
 Return the current arc.
 
GT::Arcget_curr_ne () const noexcept
 Return the current arc.
 
auto get_current_arc () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_curr().
 
GT::Nodeget_node (typename GT::Arc *a) const noexcept
 Return the connected node to arc.
 
GT::Nodeget_node () const
 Return the connected node to current arc.
 
auto get_tgt_node () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_node().
 
GT::Nodeget_node_ne () const noexcept
 Return the connected node to current arc.
 
auto get_tgt_node_ne () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_node_ne().
 
void reset_first () noexcept
 Reset the iterator to the first arc.
 
void reset_last () noexcept
 Reset the iterator to the last arc.
 
void end () noexcept
 Put the iterator in end state.
 

Private Types

using Itor = Filter_Iterator< typename GT::Node *, typename GT::Node_Arc_Iterator, Filter >
 

Private Attributes

Filter filt
 
Itor it
 

Detailed Description

template<class GT, class Filter>
class Aleph::Digraph_Iterator< GT, Filter >

Filtered iterator on directed graphs.

Definition at line 1608 of file tpl_graph.H.

Member Typedef Documentation

◆ Item_Type

◆ Iterator_Type

template<class GT , class Filter >
using Aleph::Digraph_Iterator< GT, Filter >::Iterator_Type = Itor

The type of element.

Definition at line 1619 of file tpl_graph.H.

◆ Itor

template<class GT , class Filter >
using Aleph::Digraph_Iterator< GT, Filter >::Itor = Filter_Iterator<typename GT::Node *, typename GT::Node_Arc_Iterator, Filter>
private

Definition at line 1610 of file tpl_graph.H.

Constructor & Destructor Documentation

◆ Digraph_Iterator()

Iterator type.

Initialize an iterator on adjacent arcs (incoming or outcoming) of p

Definition at line 1622 of file tpl_graph.H.

Member Function Documentation

◆ end()

template<class GT , class Filter >
void Aleph::Digraph_Iterator< GT, Filter >::end ( )
inlinenoexcept

Put the iterator in end state.

Definition at line 1717 of file tpl_graph.H.

References put_itor_at_the_end().

◆ get_curr()

template<class GT , class Filter >
GT::Arc * Aleph::Digraph_Iterator< GT, Filter >::get_curr ( ) const
inline

Return the current arc.

Throws overflow_error it there is no current

Definition at line 1652 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::it.

Referenced by Aleph::Digraph_Iterator< GT, Filter >::get_current_arc(), and Aleph::Digraph_Iterator< GT, Filter >::get_node().

◆ get_curr_ne()

template<class GT , class Filter >
GT::Arc * Aleph::Digraph_Iterator< GT, Filter >::get_curr_ne ( ) const
inlinenoexcept

Return the current arc.

Throws overflow_error it there is no current

Definition at line 1659 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::it.

Referenced by Aleph::Digraph_Iterator< GT, Filter >::get_node_ne().

◆ get_current_arc()

template<class GT , class Filter >
auto Aleph::Digraph_Iterator< GT, Filter >::get_current_arc ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_curr().

Returns current arc.

Definition at line 1666 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::get_curr().

◆ get_node() [1/2]

template<class GT , class Filter >
GT::Node * Aleph::Digraph_Iterator< GT, Filter >::get_node ( ) const
inline

Return the connected node to current arc.

Definition at line 1679 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::get_curr(), and Aleph::Digraph_Iterator< GT, Filter >::get_node().

◆ get_node() [2/2]

template<class GT , class Filter >
GT::Node * Aleph::Digraph_Iterator< GT, Filter >::get_node ( typename GT::Arc a) const
inlinenoexcept

◆ get_node_ne()

template<class GT , class Filter >
GT::Node * Aleph::Digraph_Iterator< GT, Filter >::get_node_ne ( ) const
inlinenoexcept

◆ get_tgt_node()

template<class GT , class Filter >
auto Aleph::Digraph_Iterator< GT, Filter >::get_tgt_node ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_node().

Returns target node of current arc.

Definition at line 1686 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::get_node().

◆ get_tgt_node_ne()

template<class GT , class Filter >
auto Aleph::Digraph_Iterator< GT, Filter >::get_tgt_node_ne ( ) const
inlinenoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_node_ne().

Returns target node of current arc (no exceptions).

Definition at line 1699 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::get_node_ne().

◆ has_curr()

◆ next()

template<class GT , class Filter >
void Aleph::Digraph_Iterator< GT, Filter >::next ( )
inline

Move the iterator one position forward.

Throws overflow_error it there is no current

Definition at line 1630 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::it, and Aleph::Filter_Iterator< Container, It, Show_Item >::next().

◆ next_ne()

◆ prev()

template<class GT , class Filter >
void Aleph::Digraph_Iterator< GT, Filter >::prev ( )
inline

Move the iterator one position backward.

Throws overflow_error if there is no current

Definition at line 1642 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::it, and Aleph::Filter_Iterator< Container, It, Show_Item >::prev().

◆ reset_first()

template<class GT , class Filter >
void Aleph::Digraph_Iterator< GT, Filter >::reset_first ( )
inlinenoexcept

Reset the iterator to the first arc.

Definition at line 1705 of file tpl_graph.H.

References Aleph::Filter_Iterator< Container, It, Show_Item >::reset_first().

◆ reset_last()

template<class GT , class Filter >
void Aleph::Digraph_Iterator< GT, Filter >::reset_last ( )
inlinenoexcept

Reset the iterator to the last arc.

Definition at line 1711 of file tpl_graph.H.

References Aleph::Digraph_Iterator< GT, Filter >::it, and Aleph::Filter_Iterator< Container, It, Show_Item >::reset_last().

Member Data Documentation

◆ filt

template<class GT , class Filter >
Filter Aleph::Digraph_Iterator< GT, Filter >::filt
private

Definition at line 1613 of file tpl_graph.H.

Referenced by Aleph::Digraph_Iterator< GT, Filter >::get_node().

◆ it


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