14#ifndef OR_TOOLS_GRAPH_MAX_FLOW_H_
15#define OR_TOOLS_GRAPH_MAX_FLOW_H_
21#include "ortools/graph/flow_problem.pb.h"
124 std::vector<NodeIndex> arc_tail_;
125 std::vector<NodeIndex> arc_head_;
126 std::vector<FlowQuantity> arc_capacity_;
127 std::vector<ArcIndex> arc_permutation_;
128 std::vector<FlowQuantity> arc_flow_;
133 typedef ::util::ReverseArcStaticGraph<NodeIndex, ArcIndex>
Graph;
134 std::unique_ptr<Graph> underlying_graph_;
135 std::unique_ptr<GenericMaxFlow<Graph> > underlying_max_flow_;
SimpleMaxFlow & operator=(const SimpleMaxFlow &)=delete
FlowModelProto CreateFlowModelProto(NodeIndex source, NodeIndex sink) const
Creates the protocol buffer representation of the current problem.
FlowQuantity OptimalFlow() const
SimpleMaxFlow(const SimpleMaxFlow &)=delete
This type is neither copyable nor movable.
void SetArcCapacity(ArcIndex arc, FlowQuantity capacity)
ArcIndex NumArcs() const
Returns the current number of arcs in the graph.
void GetSinkSideMinCut(std::vector< NodeIndex > *result)
NodeIndex Tail(ArcIndex arc) const
ArcIndex AddArcWithCapacity(NodeIndex tail, NodeIndex head, FlowQuantity capacity)
NodeIndex NumNodes() const
@ BAD_RESULT
This should not happen. There was an error in our code (i.e. file a bug).
@ BAD_INPUT
The input is inconsistent (bad tail/head/capacity values).
NodeIndex Head(ArcIndex arc) const
Status Solve(NodeIndex source, NodeIndex sink)
FlowQuantity Capacity(ArcIndex arc) const
FlowQuantity Flow(ArcIndex arc) const
void GetSourceSideMinCut(std::vector< NodeIndex > *result)
In SWIG mode, we don't want anything besides these top-level includes.
util::ReverseArcStaticGraph Graph
Type of graph to use.