Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator Struct Reference

Iterator on all arcs of a graph. More...

#include <tpl_graph.H>

Inheritance diagram for Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator:
[legend]
Collaboration diagram for Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator:
[legend]

Public Types

using Item_Type = Arc *
 
using Set_Type = List_Graph
 The type of element over whom iterate.
 

Public Member Functions

 Arc_Iterator ()=default
 The type of set.
 
 Arc_Iterator (const List_Graph &g) noexcept
 Initialize an iterator for all the arc of g
 
Arcget_current_arc_ne () const noexcept
 Return the current arc. Throw overflow_error if there is no one.
 
Arcget_current_arc () const
 
Arcget_curr () const
 
Arcget_curr_ne () const noexcept
 
Nodeget_src_node () const
 Return the source node of the current arc.
 
Nodeget_src_node_ne () const
 
Nodeget_tgt_node () const
 Return the target node of current arc.
 
Nodeget_tgt_node_ne () const
 

Detailed Description

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
struct Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator

Iterator on all arcs of a graph.

This iterator scans all the arcs of the graph. The apparition order is random, but this can be modified through of sort_arcs() method.

See also
sort_arcs()

Definition at line 916 of file tpl_graph.H.

Member Typedef Documentation

◆ Item_Type

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
using Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::Item_Type = Arc *

Definition at line 918 of file tpl_graph.H.

◆ Set_Type

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
using Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::Set_Type = List_Graph

The type of element over whom iterate.

Definition at line 920 of file tpl_graph.H.

Constructor & Destructor Documentation

◆ Arc_Iterator() [1/2]

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::Arc_Iterator ( )
default

The type of set.

◆ Arc_Iterator() [2/2]

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::Arc_Iterator ( const List_Graph g)
inlinenoexcept

Initialize an iterator for all the arc of g

Definition at line 925 of file tpl_graph.H.

Member Function Documentation

◆ get_curr()

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Arc * Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_curr ( ) const
inline

◆ get_curr_ne()

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Arc * Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_curr_ne ( ) const
inlinenoexcept

◆ get_current_arc()

◆ get_current_arc_ne()

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Arc * Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_current_arc_ne ( ) const
inlinenoexcept

◆ get_src_node()

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Node * Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_src_node ( ) const
inline

Return the source node of the current arc.

Throw overflow_error if there is no one. Of course, only has sense if one iterates on a directed graph

Definition at line 955 of file tpl_graph.H.

References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_current_arc().

◆ get_src_node_ne()

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Node * Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_src_node_ne ( ) const
inline

◆ get_tgt_node()

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Node * Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_tgt_node ( ) const
inline

Return the target node of current arc.

Throw overflow_error if there is no one. Of course, only has sense if one iterates on a directed graph

Definition at line 968 of file tpl_graph.H.

References Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_current_arc().

◆ get_tgt_node_ne()

template<typename _Graph_Node = Graph_Node<unsigned long>, typename _Graph_Arc = Graph_Arc<unsigned long>>
Node * Aleph::List_Graph< _Graph_Node, _Graph_Arc >::Arc_Iterator::get_tgt_node_ne ( ) const
inline

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