Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Digraph< BaseGraph >::In_Iterator Struct Reference

Iterator on the arcs that go into a node of the digraph. More...

#include <graph-dry.H>

Inheritance diagram for Aleph::Digraph< BaseGraph >::In_Iterator:
[legend]
Collaboration diagram for Aleph::Digraph< BaseGraph >::In_Iterator:
[legend]

Public Types

using Walk = Aleph::graph_dry_detail::In_Arcs_Walk< Digraph, Aleph::graph_dry_detail::Show_Every_Arc >
 The walk of the arcs of the digraph into a node.
 
- Public Types inherited from Aleph::graph_dry_detail::In_Arcs_Walk< Digraph, Aleph::graph_dry_detail::Show_Every_Arc >
using Item_Type = Arc *
 The type of the items: arcs.
 

Additional Inherited Members

- Public Member Functions inherited from Aleph::graph_dry_detail::In_Arcs_Walk< Digraph, Aleph::graph_dry_detail::Show_Every_Arc >
 In_Arcs_Walk (const Digraph &g, Node *p, Aleph::graph_dry_detail::Show_Every_Arc sa=Aleph::graph_dry_detail::Show_Every_Arc())
 The arcs of g into p that sa shows, from the first one.
 
 In_Arcs_Walk (Node *, Aleph::graph_dry_detail::Show_Every_Arc sa=Aleph::graph_dry_detail::Show_Every_Arc())
 The form that takes only the node, which does not compile: the list of a node of a digraph holds only the arcs that leave it.
 
bool has_curr () const noexcept
 Return true if there is a current arc.
 
Arc * get_curr () const
 Return the current arc. Throws overflow_error if there is none.
 
Arc * get_curr_ne () const noexcept
 Return the current arc, which must exist.
 
Arc * get_current_arc () const
 See get_curr().
 
Arc * get_current_arc_ne () const noexcept
 See get_curr_ne().
 
Node * get_node (Arc *a) const noexcept
 Return the source of a.
 
Node * get_node () const
 Return the source of the current arc.
 
Node * get_node_ne () const noexcept
 Return the source of the current arc, which must exist.
 
Node * get_tgt_node () const
 Alias of get_node().
 
Node * get_tgt_node_ne () const noexcept
 Alias of get_node_ne().
 
void next ()
 Move to the next arc.
 
void next_ne () noexcept(shows_ne)
 Move to the next arc, which must exist; noexcept when the filter is, else what the filter throws goes out.
 
void prev ()
 Move to the previous arc.
 
void prev_ne () noexcept(shows_ne)
 prev() without its exception: nothing if there is no current arc; noexcept when the filter is, else what the filter throws goes out.
 
void reset_first ()
 Put the walk on the first arc.
 
void reset_last ()
 Put the walk on the last arc.
 
void end () noexcept
 Put the walk past the last arc.
 
- Static Public Attributes inherited from Aleph::graph_dry_detail::In_Arcs_Walk< Digraph, Aleph::graph_dry_detail::Show_Every_Arc >
static constexpr bool goes_back
 Whether the walk moves back: the arc iterators of List_SGraph and List_SDigraph go only forward.
 
static constexpr bool goes_to_last
 Whether the walk goes to its last arc, which reset_last() needs.
 

Detailed Description

template<class BaseGraph>
struct Aleph::Digraph< BaseGraph >::In_Iterator

Iterator on the arcs that go into a node of the digraph.

A digraph keeps each arc only in the list of its source, so that In_Iterator(g, p) walks the arcs of the graph, in the order of its arc iterator, and keeps those whose target is p: to build it and go through all of them takes \(O(E)\). In_Iterator(p), which would walk the list of p, does not compile. To go through the arcs into many nodes, build an In_Arcs_Index once, in \(O(V + E)\).

Definition at line 4442 of file graph-dry.H.

Member Typedef Documentation

◆ Walk

template<class BaseGraph >
using Aleph::Digraph< BaseGraph >::In_Iterator::Walk = Aleph::graph_dry_detail::In_Arcs_Walk<Digraph, Aleph::graph_dry_detail::Show_Every_Arc>

The walk of the arcs of the digraph into a node.

Definition at line 4446 of file graph-dry.H.


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