Aleph-w  1.9
General library for algorithms and data structures
GraphCommon< GT, Node, Arc >::Out_Filt Struct Reference

#include <graph-dry.H>

Public Member Functions

 Out_Filt (Node *__src) noexcept
 source node of iteration More...
 
bool operator() (Arc *a) const noexcept
 
Node * get_node (Arc *a) const noexcept
 Return the source node of arc a (whose target is tgt)
 

Public Attributes

Node * src = nullptr
 

Detailed Description

template<class GT, class Node, class Arc>
struct GraphCommon< GT, Node, Arc >::Out_Filt

Filter for output arcs of a node.

This class is intended to be used in a arc iterator for only shwoing the output arcs.

When an arc is created, the source and target nodes are specified. For example:

auto a = g.insert_arc(s, t)

creates an arc linking the nodes s and t. If g is a directed graph, then the notion of source and target has an esential sense. In this case $s \longrightarrow t \ neq t \longrightarrow s$. The classes List_Digraph, List_SDigraph and Array_Digraph were conceived for explicit modeling of directed graphs.

However, sometimes is very useful to consider the sense $s \longrightarrow t$ i graph classes that do not explicitely model the sense. The Out_Filt filter used in combination with a filter iterator on arcs, is used for filtering arcs whose source is connected to the node on the which one is iterating.

This class in intensively used in Aleph-w ( $\aleph_\omega$) network flows, which, in order to directly have the residual net, use non-directed graphs instead of directed ones.

Normally you must not worry by the existence of this class. It is transparently used by the class Out_Iterator

Constructor & Destructor Documentation

◆ Out_Filt()

template<class GT, class Node, class Arc>
GraphCommon< GT, Node, Arc >::Out_Filt::Out_Filt ( Node *  __src)
inlinenoexcept

source node of iteration

Build a output filter of arc outcoming from __src

Member Function Documentation

◆ operator()()

template<class GT, class Node, class Arc>
bool GraphCommon< GT, Node, Arc >::Out_Filt::operator() ( Arc *  a) const
inlinenoexcept

Return true if a is a outcoming arc from src; false otherwise


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

Leandro Rabindranath León