C++ Reference
C++ Reference: Graph
max_flow.h
Go to the documentation of this file.
void GlobalUpdate()
bool use_two_phase_algorithm_
Definition: max_flow.h:621
void SetArcCapacity(ArcIndex arc, FlowQuantity capacity)
bool Solve()
void SetCapacityAndClearFlow(ArcIndex arc, FlowQuantity capacity)
Definition: max_flow.h:442
FlowModel CreateFlowModel()
Definition: max_flow.h:152
void SetCheckInput(bool value)
Definition: max_flow.h:419
NodeIndex NumNodes() const
Graph::OutgoingOrOppositeIncomingArcIterator OutgoingOrOppositeIncomingArcIterator
Definition: max_flow.h:321
bool IsActive(NodeIndex node) const
Definition: max_flow.h:437
void PushActiveNode(const NodeIndex &node)
Definition: max_flow.h:468
PriorityQueueWithRestrictedPush< NodeIndex, NodeHeight > active_node_by_height_
Definition: max_flow.h:597
FlowQuantity Flow(ArcIndex arc) const
bool IsEmptyActiveNodeContainer()
Definition: max_flow.h:477
bool IsAdmissible(ArcIndex arc) const
Definition: max_flow.h:430
PriorityQueueWithRestrictedPush()
Definition: max_flow.h:266
Status Solve(NodeIndex source, NodeIndex sink)
bool SaturateOutgoingArcsFromSource()
FlowQuantity Capacity(ArcIndex arc) const
Definition: max_flow.h:375
void ProcessNodeByHeight(bool value)
Definition: max_flow.h:421
void InitializeActiveNodeContainer()
void Refine()
void GetSourceSideMinCut(std::vector< NodeIndex > *result)
bool CheckRelabelPrecondition(NodeIndex node) const
NodeIndex Tail(ArcIndex arc) const
ArcIndex NumArcs() const
void GetSinkSideMinCut(std::vector< NodeIndex > *result)
MaxFlow(const StarGraph *graph, NodeIndex source, NodeIndex target)
Definition: max_flow.h:654
Graph::OutgoingArcIterator OutgoingArcIterator
Definition: max_flow.h:319
void GetSinkSideMinCut(std::vector< NodeIndex > *result)
FlowQuantity OptimalFlow() const
QuantityArray residual_arc_capacity_
Definition: max_flow.h:581
void SetCheckResult(bool value)
Definition: max_flow.h:420
NodeIndex Tail(ArcIndex arc) const
Definition: max_flow.h:533
void SetArcCapacity(ArcIndex arc, FlowQuantity new_capacity)
NodeHeightArray node_potential_
Definition: max_flow.h:563
void SetUseGlobalUpdate(bool value)
Definition: max_flow.h:414
ArcIndexArray first_admissible_arc_
Definition: max_flow.h:584
NodeIndex Head(ArcIndex arc) const
ZVector< FlowQuantity > QuantityArray
Definition: ebert_graph.h:209
void Relabel(NodeIndex node)
FlowQuantity Capacity(ArcIndex arc) const
bool use_global_update_
Definition: max_flow.h:614
void PushFlowExcessBackToSource()
std::vector< NodeIndex > bfs_queue_
Definition: max_flow.h:611
NodeIndex GetAndRemoveFirstActiveNode()
Definition: max_flow.h:460
void SetArcFlow(ArcIndex arc, FlowQuantity new_flow)
NodeIndex GetSinkNodeIndex() const
Definition: max_flow.h:349
bool CheckResult() const
void PushFlow(FlowQuantity flow, ArcIndex arc)
SimpleMaxFlow()
Graph::IncomingArcIterator IncomingArcIterator
Definition: max_flow.h:322
std::vector< NodeIndex > active_nodes_
Definition: max_flow.h:590
QuantityArray node_excess_
Definition: max_flow.h:550
void Push(Element element, IntegerPriority priority)
Definition: max_flow.h:673
void RefineWithGlobalUpdate()
bool IsEmpty() const
Definition: max_flow.h:661
ZVector< ArcIndex > ArcIndexArray
Definition: max_flow.h:323
ArcIndex Opposite(ArcIndex arc) const
Definition: max_flow.h:652
FlowQuantity GetOptimalFlow() const
Definition: max_flow.h:361
bool AugmentingPathExists() const
NodeIndex Head(ArcIndex arc) const
Definition: max_flow.h:532
static const FlowQuantity kMaxFlowQuantity
Definition: max_flow.h:544
void SetUseTwoPhaseAlgorithm(bool value)
Definition: max_flow.h:418
void InitializePreflow()
Definition: christofides.h:33
ArcIndex AddArcWithCapacity(NodeIndex tail, NodeIndex head, FlowQuantity capacity)
Definition: ebert_graph.h:188
void Discharge(NodeIndex node)
FlowModel CreateFlowModelOfLastSolve()
virtual ~GenericMaxFlow()
Definition: max_flow.h:335
GenericMaxFlow(const Graph *graph, NodeIndex source, NodeIndex sink)
void ComputeReachableNodes(NodeIndex start, std::vector< NodeIndex > *result)
bool CheckInputConsistency() const
bool IsArcDirect(ArcIndex arc) const
FlowQuantity Flow(ArcIndex arc) const
Definition: max_flow.h:365
bool IsArcValid(ArcIndex arc) const
std::vector< bool > node_in_bfs_queue_
Definition: max_flow.h:610
bool process_node_by_height_
Definition: max_flow.h:629
std::string DebugString(const std::string &context, ArcIndex arc) const
void GetSourceSideMinCut(std::vector< NodeIndex > *result)
ZVector< NodeHeight > NodeHeightArray
Definition: max_flow.h:328
NodeIndex GetSourceNodeIndex() const
Definition: max_flow.h:346