Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SubBidirGraphAdaptor Class Template Reference
[Adaptor Classes for Graphs]

#include <lemon/graph_adaptor.h>

List of all members.


Detailed Description

template<typename _Graph, typename ForwardFilterMap, typename BackwardFilterMap>
class lemon::SubBidirGraphAdaptor< _Graph, ForwardFilterMap, BackwardFilterMap >

An adaptor for composing a subgraph of a bidirected graph made from a directed one.

Warning:
Graph adaptors are in even more experimental state than the other parts of the lib. Use them at you own risk.
Let $G=(V, A)$ be a directed graph and for each directed edge $e\in A$ , let $\bar e$ denote the edge obtained by reversing its orientation. We are given moreover two bool valued maps on the edge-set, $forward\_filter$ , and $backward\_filter$ . SubBidirGraphAdaptor implements the graph structure with node-set $V$ and edge-set $\{e : e\in A \mbox{ and } forward\_filter(e) \mbox{ is true}\}+\{\bar e : e\in A \mbox{ and } backward\_filter(e) \mbox{ is true}\}$ . The purpose of writing + instead of union is because parallel edges can arise. (Similarly, antiparallel edges also can arise). In other words, a subgraph of the bidirected graph obtained, which is given by orienting the edges of the original graph in both directions. As the oppositely directed edges are logically different, the maps are able to attach different values for them.

An example for such a construction is RevGraphAdaptor where the forward_filter is everywhere false and the backward_filter is everywhere true. We note that for sake of efficiency, RevGraphAdaptor is implemented in a different way. But BidirGraphAdaptor is obtained from SubBidirGraphAdaptor by considering everywhere true valued maps both for forward_filter and backward_filter.

The most important application of SubBidirGraphAdaptor is ResGraphAdaptor, which stands for the residual graph in directed flow and circulation problems. As adaptors usually, the SubBidirGraphAdaptor implements the above mentioned graph structure without its physical storage, that is the whole stuff is stored in constant memory.


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:15:33 2005 for LEMON by  doxygen 1.4.4