Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::in_arcs_detail Namespace Reference

Functions

template<AlephGraph GT, class SA , class Op >
bool traverse_digraph_arcs_into (const GT &g, typename GT::Node *p, SA &sa, Op op)
 Calls op(a) on each arc a of the digraph g into p that sa shows, while it returns true, and tells whether it went through them all.
 
template<AlephGraph GT, class SA >
size_t digraph_in_degree (const GT &g, typename GT::Node *p, SA &sa)
 The number of arcs of the digraph g into p that sa shows, among the arcs of the graph, in \(O(E)\); out of line, as traverse_digraph_arcs_into().
 
template<AlephGraph GT, class SA , class Op >
bool traverse_arcs_into (const GT &g, typename GT::Node *p, SA &sa, Op op)
 Calls op(a) on each arc a of g into p that sa shows, while it returns true, and tells whether it went through them all.
 

Function Documentation

◆ digraph_in_degree()

template<AlephGraph GT, class SA >
size_t Aleph::in_arcs_detail::digraph_in_degree ( const GT &  g,
typename GT::Node *  p,
SA &  sa 
)

The number of arcs of the digraph g into p that sa shows, among the arcs of the graph, in \(O(E)\); out of line, as traverse_digraph_arcs_into().

Definition at line 2541 of file tpl_graph.H.

References Aleph::and, Aleph::count(), and Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne().

Referenced by Aleph::in_degree().

◆ traverse_arcs_into()

template<AlephGraph GT, class SA , class Op >
bool Aleph::in_arcs_detail::traverse_arcs_into ( const GT &  g,
typename GT::Node *  p,
SA &  sa,
Op  op 
)

Calls op(a) on each arc a of g into p that sa shows, while it returns true, and tells whether it went through them all.

On a digraph, which it tells at run time, it walks the arcs of the graph, in \(O(E)\); on a graph that is not directed, the list of p.

Definition at line 2559 of file tpl_graph.H.

References GraphCommon< GT, Node, Arc >::is_digraph(), Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), and traverse_digraph_arcs_into().

Referenced by Aleph::for_each_in_arc(), Aleph::in_arcs(), Aleph::in_nodes(), Aleph::in_pairs(), and Aleph::traverse_in_arcs().

◆ traverse_digraph_arcs_into()

template<AlephGraph GT, class SA , class Op >
bool Aleph::in_arcs_detail::traverse_digraph_arcs_into ( const GT &  g,
typename GT::Node *  p,
SA &  sa,
Op  op 
)

Calls op(a) on each arc a of the digraph g into p that sa shows, while it returns true, and tells whether it went through them all.

A digraph keeps each arc only in the list of its source: this walks the arcs of the graph, in \(O(E)\). Out of line, and with op by value, a lambda that refers to what it changes, so that the forms that take the graph cost on a graph that is not directed only the test of g.is_digraph().

Definition at line 2527 of file tpl_graph.H.

References Aleph::and, and Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne().

Referenced by traverse_arcs_into().