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