Bpp/Graph_problem Max_flow | C++ |
|  |
This module provides facilities to solve the maximum flow problem in graphs. This section allows you to access the C++ source files of the module. This module is part of Bpp/Graph_problem . The files listed below are included in the interface part of the module. So any module dependent of this module is also dependent of the files listed here. The files listed below are needed by the implementation part of the module. But a module dependent of this module is not necessary dependent of the files listed here. The namespaces listed below are integrated in this module. That means any element declared in one of those namespaces can now be directly used by or from this module. The aliases listed below are only used internally by the interface. They are here just to lighten the writing of certain declarations. Never use them, they are local to the interface and can not be used outside of it. tdGraph = class prArcData,class prNodeData
tuGraph = prArcData,prNodeData
Here are listed the types defined in the module. To use one of them, you have to specify the namespace of the module. type clArc<clFlowData,clNoData> clFlowArc Arc of a graph with a maximum flow problem.
type clGraph<clFlowData,clNoData> clFlowGraph Graph with a maximum flow problem.
type clNode<clFlowData,clNoData> clFlowNode Node of a graph with a maximum flow problem.
Here are listed the functions provided by the module. To use one of them, you have to specify the namespace of the module. template <tdGraph> tyBoolean findIncreasingChain(clGraph<tuGraph> & agGraph,clNode<tuGraph> & agSourceNode,clNode<tuGraph> & agTargetNode,std_vector(clArc<tuGraph> *) & agChain) Finds a chain that can increase the flow between two given nodes of a graph.
template <tdGraph> void findMaximumFlow(clGraph<tuGraph> & agGraph,clNode<tuGraph> & agSourceNode,clNode<tuGraph> & agTargetNode) Finds the maximum flow between two nodes of a graph using Ford and Fulkerson's method.
template <tdGraph> void generateFlowGraph(clGraph<tuGraph> & agGraph,tyCardinal agNbNode,tyCardinal agNbArc,tyInteger agCapacityScale) Generates randomly a maximum flow problem with a given flow capacity scale, in a graph with given numbers of arcs and nodes (the unique source and target nodes, as well as the arcs that link them to the graph, are not counted, i.e. the numbers of arcs and nodes are a little more than given).
template <tdGraph> tyReal totalIncomingFlow(const clNode<tuGraph> & agNode) Returns the amount of flow that enters a node.
template <tdGraph> tyReal totalOutgoingFlow(const clNode<tuGraph> & agNode) Returns the amount of flow that leaves a node.
| | Copyright (c) 1999-2016 - Bruno Bachelet - bruno@nawouak.net - http://www.nawouak.net | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation. See this license for more details (http://www.gnu.org). |
|
| |