Aleph-w  1.9
General library for algorithms and data structures
Aleph::Arc_Iterator< GT, Show_Arc > Struct Template Reference

#include <tpl_graph.H>

+ Inheritance diagram for Aleph::Arc_Iterator< GT, Show_Arc >:
+ Collaboration diagram for Aleph::Arc_Iterator< GT, Show_Arc >:

Public Types

using Itor = Filter_Iterator< GT, typename GT::Arc_Iterator, Show_Arc >
 
using Item_Type = typename Itor::Item_Type
 
using Set_Type = typename Itor::Set_Type
 Type of element: Arc*.
 
typedef GT::Arc_Iterator Iterator_Type
 El tipo de iterador.
 

Public Member Functions

 Arc_Iterator () noexcept
 Type of set all the arcs.
 
 Arc_Iterator (const GT &g, Show_Arc sa=Show_Arc()) noexcept(noexcept(Itor(g, sa)))
 
const GT & get_container () const
 
GT::Arc_Iterator & get_iterator ()
 Retorna el iterador de fondo.
 
Show_Arc & get_filter ()
 
void set_filter (Show_Arc si)
 
void set_cookie (void *__cookie)
 
void next ()
 Adelanta el iterador una posición.
 
void next_ne () noexcept
 
void prev ()
 Retrocede el iterador una posición.
 
void reset_first ()
 Coloca el iterador sobre el primer elemento de la secuencia.
 
void reset_last ()
 Coloca el iterador sobre el último elemento de la secuencia.
 

Detailed Description

template<class GT, class Show_Arc = Dft_Show_Arc<GT>>
struct Aleph::Arc_Iterator< GT, Show_Arc >

Filtered iterator on all the arcs of a graph

Arc_Iterator is an iterator similar to GT::Arc_Iterator, except that only are shown the arcs satisfaying a filter condition.

The condition must be specified trhough a functor whose signature must be as follows:

struct Show_Arc
{
  bool operator () (GT::Arc * arc) { /// the filter condition }
};

Constructor & Destructor Documentation

◆ Arc_Iterator()

template<class GT , class Show_Arc = Dft_Show_Arc<GT>>
Aleph::Arc_Iterator< GT, Show_Arc >::Arc_Iterator ( const GT &  g,
Show_Arc  sa = Show_Arc() 
)
inlinenoexcept

Constructor,

Parameters
[in]gthe graph
[in]safilter functor

Member Function Documentation

◆ get_filter()

Show_Arc & Aleph::Filter_Iterator< GT , GT::Arc_Iterator , Show_Arc >::get_filter ( )
inlineinherited

Retorna una referencia a la clase filtro. Úsese esta función si se requiere obtener el estado del filtro (recuérdese que se perderá cuando se invoque al destructor ~Filter_Iterator()


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

Leandro Rabindranath León