Computes a max flow via Preflow-Push (global relabeling and gap relabeling heuristic). More...
#include <ogdf/graphalg/MaxFlowGoldbergTarjan.h>
Public Member Functions | |
void | computeFlowAfterValue () |
Compute the flow itself after the flow value is already computed. Only used in algorithms with 2 phases. The flow is stored in the array that the user gave in the constructor. More... | |
TCap | computeValue (const EdgeArray< TCap > &cap, const node &s, const node &t) |
Compute only the value of the flow. More... | |
Public Member Functions inherited from ogdf::MaxFlowModule< TCap > | |
MaxFlowModule () | |
Empty Constructor. More... | |
MaxFlowModule (const Graph &graph, EdgeArray< TCap > *flow=nullptr) | |
Constructor that calls init. More... | |
virtual | ~MaxFlowModule () |
Destructor that deletes m_flow if it is an internal flow array. More... | |
TCap | computeFlow (EdgeArray< TCap > &cap, node &s, node &t, EdgeArray< TCap > &flow) |
Only a shortcut for computeValue and computeFlowAfterValue. More... | |
void | computeFlowAfterValue (EdgeArray< TCap > &flow) |
Compute the flow itself after the flow value is already computed. Only used in algorithms with 2 phases. The flow is stored in the parameter flow . More... | |
virtual void | init (const Graph &graph, EdgeArray< TCap > *flow=nullptr) |
Initialize the problem with a graph and optional flow array. If no flow array is given, a new ("internal") array will be created. If a flow array is given, the algorithm uses this "external" array. More... | |
bool | isFeasibleInstance () const |
Return whether the instance is feasible, i.e. the capacities are non-negative. More... | |
void | useEpsilonTest (const double &eps) |
Change the used EpsilonTest from StandardEpsilonTest to a user given EpsilonTest. More... | |
Private Member Functions | |
void | findNewMaxLabel () |
TCap | getCap (const edge e) const |
void | globalRelabel () |
bool | isActive (const node v) const |
bool | isAdmissible (const adjEntry adj) const |
bool | isResidualEdge (const adjEntry adj) const |
void | push (const adjEntry adj) |
void | relabel (const node v) |
void | relabelStage2 (const node v) |
void | setActive (const node v) |
void | setInactive (const node v) |
void | setLabel (const node v, int label) |
Private Attributes | |
Array< List< node > > | m_activeLabelList |
NodeArray< ListIterator< node > > | m_activeLabelListPosition |
List< edge > | m_cutEdges |
List< node > | m_cutNodes |
NodeArray< TCap > | m_ex |
NodeArray< int > | m_label |
int | m_maxLabel = 0 |
Additional Inherited Members | |
Protected Attributes inherited from ogdf::MaxFlowModule< TCap > | |
const EdgeArray< TCap > * | m_cap |
Pointer to the given capacity array. More... | |
EpsilonTest * | m_et |
Pointer to the used EpsilonTest. More... | |
EdgeArray< TCap > * | m_flow |
Pointer to (extern) flow array. More... | |
const Graph * | m_G |
Pointer to the given graph. More... | |
const node * | m_s |
Pointer to the source node. More... | |
const node * | m_t |
Pointer to the sink node. More... | |
Computes a max flow via Preflow-Push (global relabeling and gap relabeling heuristic).
Definition at line 60 of file MaxFlowGoldbergTarjan.h.
|
inlinevirtual |
Compute the flow itself after the flow value is already computed. Only used in algorithms with 2 phases. The flow is stored in the array that the user gave in the constructor.
Implements ogdf::MaxFlowModule< TCap >.
Definition at line 370 of file MaxFlowGoldbergTarjan.h.
|
inlinevirtual |
Compute only the value of the flow.
There are algorithms with two phases where the value of the flow is known after the first phase, but the flow itself is not feasible or not known at this time. If source and target are the same node, the algorithm must return zero.
cap | is the EdgeArray of non-negative capacities. |
s | is the source. |
t | is the sink. |
Implements ogdf::MaxFlowModule< TCap >.
Definition at line 244 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 112 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 76 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 190 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 93 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 88 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 80 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 172 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 213 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 228 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 101 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 118 of file MaxFlowGoldbergTarjan.h.
|
inlineprivate |
Definition at line 127 of file MaxFlowGoldbergTarjan.h.
|
private |
Definition at line 65 of file MaxFlowGoldbergTarjan.h.
|
private |
Definition at line 64 of file MaxFlowGoldbergTarjan.h.
|
mutableprivate |
Definition at line 74 of file MaxFlowGoldbergTarjan.h.
|
mutableprivate |
Definition at line 73 of file MaxFlowGoldbergTarjan.h.
|
private |
Definition at line 62 of file MaxFlowGoldbergTarjan.h.
|
private |
Definition at line 61 of file MaxFlowGoldbergTarjan.h.
|
private |
Definition at line 66 of file MaxFlowGoldbergTarjan.h.