Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator Class Reference

Iterator over arcs of a graph. More...

#include <tpl_sgraph.H>

Inheritance diagram for Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator:
[legend]
Collaboration diagram for Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator:
[legend]

Public Types

using Item_Type = Arc *
 Data type returned by get_curr()
 
using Set_Type = List_SGraph
 The set type over which iteration is performed.
 

Public Member Functions

 Arc_Iterator ()=default
 
 Arc_Iterator (const List_SGraph &_g) noexcept
 
Arc * get_curr_ne () const noexcept
 Returns the current arc without checking that there is one.
 
Arc * get_curr () const
 Returns the current arc.
 
Arc * get_current_arc_ne () const noexcept
 Returns a pointer to the current arc.
 
Node * get_src_node_ne () const noexcept
 Returns the source node of the current arc (only meaningful for digraphs)
 
Node * get_tgt_node_ne () const noexcept
 Returns the target node of the current arc (only meaningful for digraphs)
 
Arc * get_current_arc () const
 Returns a pointer to the current arc.
 
Node * get_src_node () const
 Returns the source node of the current arc (only meaningful for digraphs)
 
Node * get_tgt_node () const
 Returns the target node of the current arc (only meaningful for digraphs)
 

Detailed Description

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
class Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator

Iterator over arcs of a graph.

This iterator traverses each arc of the graph, in the order of their addresses: the arcs are in a set ordered by them, so there is no sort_arcs(), which the graphs with a list of arcs have. It goes only forward: it has no prev(), so that the filtered Arc_Iterator<GT, SA> and the In_Iterator of List_SDigraph, which walks the arcs of the graph, have no prev(), prev_ne() nor reset_last().

Definition at line 448 of file tpl_sgraph.H.

Member Typedef Documentation

◆ Item_Type

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
using Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::Item_Type = Arc *

Data type returned by get_curr()

Definition at line 452 of file tpl_sgraph.H.

◆ Set_Type

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
using Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::Set_Type = List_SGraph

The set type over which iteration is performed.

Definition at line 455 of file tpl_sgraph.H.

Constructor & Destructor Documentation

◆ Arc_Iterator() [1/2]

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::Arc_Iterator ( )
default

◆ Arc_Iterator() [2/2]

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::Arc_Iterator ( const List_SGraph &  _g)
inlinenoexcept

Definition at line 463 of file tpl_sgraph.H.

Member Function Documentation

◆ get_curr()

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Arc * Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::get_curr ( ) const
inline

Returns the current arc.

Definition at line 476 of file tpl_sgraph.H.

◆ get_curr_ne()

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Arc * Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::get_curr_ne ( ) const
inlinenoexcept

Returns the current arc without checking that there is one.

Definition at line 470 of file tpl_sgraph.H.

◆ get_current_arc()

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Arc * Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::get_current_arc ( ) const
inline

Returns a pointer to the current arc.

Definition at line 500 of file tpl_sgraph.H.

References Aleph::get_curr().

◆ get_current_arc_ne()

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Arc * Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::get_current_arc_ne ( ) const
inlinenoexcept

Returns a pointer to the current arc.

Definition at line 482 of file tpl_sgraph.H.

References Aleph::get_curr_ne().

◆ get_src_node()

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Node * Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::get_src_node ( ) const
inline

Returns the source node of the current arc (only meaningful for digraphs)

Definition at line 506 of file tpl_sgraph.H.

◆ get_src_node_ne()

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Node * Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::get_src_node_ne ( ) const
inlinenoexcept

Returns the source node of the current arc (only meaningful for digraphs)

Definition at line 488 of file tpl_sgraph.H.

◆ get_tgt_node()

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Node * Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::get_tgt_node ( ) const
inline

Returns the target node of the current arc (only meaningful for digraphs)

Definition at line 509 of file tpl_sgraph.H.

◆ get_tgt_node_ne()

template<typename __Graph_Node = Graph_Snode<unsigned long>, typename __Graph_Arc = Graph_Sarc<unsigned long>>
Node * Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::Arc_Iterator::get_tgt_node_ne ( ) const
inlinenoexcept

Returns the target node of the current arc (only meaningful for digraphs)

Definition at line 494 of file tpl_sgraph.H.


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