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

Arc iterator for a graph node. More...

#include <tpl_sgraph.H>

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

Public Types

using Item_Type = Arc *
 Data type returned by get_curr()
 
using Set_Type = Node *
 The set type over which iteration is performed.
 
- Public Types inherited from Aleph::DynList< T >::Iterator
using Item_Type = T
 
using Iterator_Type = Iterator
 The type of elements of list.
 
using Set_Type = DynList
 

Public Member Functions

 Node_Arc_Iterator ()=default
 Instantiate an empty (invalid) iterator.
 
 Node_Arc_Iterator (Node *src) noexcept
 Instantiate an iterator over node src.
 
Arcget_curr_ne () const noexcept
 Return get_current_arc() without exception.
 
Arcget_curr () const
 Return get_current_arc()
 
Arcget_current_arc_ne () const noexcept
 
Arcget_current_arc () const
 
Nodeget_tgt_node_ne () const noexcept
 Returns the target node of the current arc.
 
Nodeget_tgt_node () const
 Returns the target node of the current arc.
 
- Public Member Functions inherited from Aleph::DynList< T >::Iterator
 Iterator () noexcept=default
 The type of container.
 
 Iterator (const DynList &list) noexcept
 Initiliaze an iterator on the first item of list
 
Tget_curr_ne () const noexcept
 Return the current link guaranteeing no exception. Be careful.
 
Tget_curr () const
 Return the current item.
 
T del ()
 Remove the current item of the iterator.
 
- Public Member Functions inherited from Aleph::HTList::Iterator
 Iterator () noexcept=default
 
 Iterator (const HTList &list) noexcept
 Initialize iterator on at the first item of list
 
void reset () noexcept
 Reset the iterator at the first item.
 
long get_pos () const noexcept
 Return the current position.
 
void reset_first () noexcept
 
void reset_last ()
 It has O(n) of performance.
 
void end () noexcept
 Set the iterator to its end position, which has not current item.
 
Iteratoroperator= (const Iterator &it) noexcept
 Assignation.
 
bool has_curr () const noexcept
 Return true if iterator has current item.
 
bool is_last () const noexcept
 
bool is_in_first () const noexcept
 Return true if the iterator is positioned on the first item.
 
bool is_in_last () const noexcept
 Return true if the iterator is positioned on the last item.
 
Slinkncget_curr () const
 Return the current node on which the iterator is positioned.
 
Slinkncget_curr_ne () const noexcept
 Return the current link guaranteeing no exception. Be careful.
 
void next_ne () noexcept
 Move the iterator one position forward guaranteeing no exception.
 
void next ()
 Move the iterator one item forward.
 
Slinkncdel_ne () noexcept
 
Slinkncdel ()
 Remove the current item.
 

Private Attributes

Nodesrc_node
 

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 >::Node_Arc_Iterator

Arc iterator for a graph node.

This class iterates over all adjacent arcs of a node belonging to a graph or digraph.

Definition at line 357 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 >::Node_Arc_Iterator::Item_Type = Arc *

Data type returned by get_curr()

Definition at line 363 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 >::Node_Arc_Iterator::Set_Type = Node *

The set type over which iteration is performed.

Definition at line 366 of file tpl_sgraph.H.

Constructor & Destructor Documentation

◆ Node_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 >::Node_Arc_Iterator::Node_Arc_Iterator ( )
default

Instantiate an empty (invalid) iterator.

◆ Node_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 >::Node_Arc_Iterator::Node_Arc_Iterator ( Node src)
inlinenoexcept

Instantiate an iterator over node src.

Definition at line 372 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 >::Node_Arc_Iterator::get_curr ( ) const
inline

Return get_current_arc()

Definition at line 385 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 >::Node_Arc_Iterator::get_curr_ne ( ) const
inlinenoexcept

Return get_current_arc() without exception.

Definition at line 379 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 >::Node_Arc_Iterator::get_current_arc ( ) const
inline

Definition at line 395 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 >::Node_Arc_Iterator::get_current_arc_ne ( ) const
inlinenoexcept

Definition at line 390 of file tpl_sgraph.H.

References Aleph::get_curr_ne().

◆ 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 >::Node_Arc_Iterator::get_tgt_node ( ) const
inline

Returns the target node of the current arc.

Definition at line 408 of file tpl_sgraph.H.

References Aleph::get_curr().

◆ 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 >::Node_Arc_Iterator::get_tgt_node_ne ( ) const
inlinenoexcept

Returns the target node of the current arc.

Definition at line 401 of file tpl_sgraph.H.

References Aleph::get_curr_ne().

Member Data Documentation

◆ 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 >::Node_Arc_Iterator::src_node
private

Definition at line 359 of file tpl_sgraph.H.


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