|
ADS
Algorithms and Data Structures
|
The warm starts of the algorithms of LEMON and the solvers of ADS that use them, beyond the book (see Interoperation with LEMON). More...
#include "ADS/Contract.h"#include "ADS/Modification.h"#include "ADS/graph/MaxFlow.h"#include "ADS/graph/Reoptimization.h"#include "ADS/graph/ShortestPaths.h"#include <lemon/core.h>#include <lemon/network_simplex.h>#include <lemon/preflow.h>#include <lemon/smart_graph.h>#include <cstddef>#include <memory>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| class | ADS::lemon_interop::PreflowEngine |
| the engine of MaxFlowObserver on the Preflow of LEMON, with its warm start from the flow of the network More... | |
| class | ADS::lemon_interop::NetworkSimplexAssignment< W > |
| an engine of Assignment on the NetworkSimplex of LEMON, warm after changes of finite costs More... | |
| class | ADS::lemon_interop::MinCostFlowObserver< GR, A, CM, UM, SM > |
| a minimum cost flow of a digraph of LEMON by the algorithm A, kept up to date as an observer of the maps of its costs, upper bounds and supplies, and of the taps of its arcs and nodes More... | |
Namespaces | |
| namespace | ADS |
| namespace | ADS::lemon_interop |
The warm starts of the algorithms of LEMON and the solvers of ADS that use them, beyond the book (see Interoperation with LEMON).
LEMON has no warm start of its minimum cost flows and of its maximum flow: they are written, with ADS_WITH_LEMON, into private copies of six of its headers (network_simplex.h, cost_scaling.h, cycle_canceling.h, capacity_scaling.h, bits/mcf_feasible_flow.h, preflow.h), rewritten at configure time by the rules of ADS/interop/lemon/shim/rewrites.txt and put on the include path before LEMON, which defines ADS_LEMON_SHIM. Each rule is header|anchor|what, the anchor a whole line of the header of LEMON that must be there exactly once, or the rewrite stops, and what a block inserted before the line, a text appended to it or a line in its place. They add:
A program must see one rewritten copy of each of these headers: two different rewrites of one header in one binary give two layouts of one class, a violation of the one definition rule that compilers do not diagnose. The same holds for a C++20 module of LEMON, which must be built from the rewritten headers.
On these, the solvers of ADS that keep a solution of LEMON warm:
The contracts [see Contract.h]: those of LEMON; the digraph of a MinCostFlowObserver changes only through the taps and the maps observed. The classes are defined in this file.