Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
GraphCommon< GT, Node, Arc >::In_Filt Struct Reference

Filter for input arcs of a node. More...

#include <graph-dry.H>

Public Member Functions

 In_Filt (Node *__tgt=nullptr) noexcept
 target node of iteration
 
bool operator() (Arc *a) const noexcept
 Return true if the arc a is incoming arc to tgt; false otherwise.
 
Nodeget_node (Arc *a) const noexcept
 Return the source node of arc a
 

Public Attributes

Nodetgt = nullptr
 

Detailed Description

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

Filter for input arcs of a node.

This class is intended to be used in a arc iterator for only shwoing the input 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 much sense. This sense in esential. 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 In_Filt filter used in combination with a filter iterator on arcs, is used for filtering arcs whose target is 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 In_Iterator

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

Constructor & Destructor Documentation

◆ In_Filt()

template<class GT , class Node , class Arc >
GraphCommon< GT, Node, Arc >::In_Filt::In_Filt ( Node __tgt = nullptr)
inlinenoexcept

target node of iteration

Buld a filter on input arcs to arc __tgt

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

Member Function Documentation

◆ get_node()

template<class GT , class Node , class Arc >
Node * GraphCommon< GT, Node, Arc >::In_Filt::get_node ( Arc a) const
inlinenoexcept

Return the source node of arc a

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

References GraphCommon< GT, Node, Arc >::In_Filt::tgt.

◆ operator()()

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

Return true if the arc a is incoming arc to tgt; false otherwise.

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

References GraphCommon< GT, Node, Arc >::In_Filt::tgt.

Member Data Documentation

◆ tgt

template<class GT , class Node , class Arc >
Node* GraphCommon< GT, Node, Arc >::In_Filt::tgt = nullptr

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