Google OR-Tools: ortools/graph/max_flow.h Source File

Loading...

Searching...

No Matches

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef ORTOOLS_GRAPH_MAX_FLOW_H_

15#define ORTOOLS_GRAPH_MAX_FLOW_H_

16

17#include <cstdint>

18#include <memory>

19#include <vector>

20

24

26

27

28

29

30

31

32

34 public:

38

39

40

42

43#ifndef SWIG

44

47#endif

48

49

50

51

52

55

56

57

59

60

62

63

64

68

69

70

72

73

75

76

77

78

79

80

82

84

86 };

88

89

90

92

93

94

95

96

97

98

100

101

102

103

105

106

107

108

109

111

112

113

114

115

116

118

119

121

122 private:

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_;

130

131

132

133 typedef ::util::ReverseArcStaticGraph<NodeIndex, ArcIndex> Graph;

134 std::unique_ptr<Graph> underlying_graph_;

135 std::unique_ptr<GenericMaxFlow<Graph> > underlying_max_flow_;

136};

137

138}

139

140#endif

SimpleMaxFlow & operator=(const SimpleMaxFlow &)=delete

FlowModelProto CreateFlowModelProto(NodeIndex source, NodeIndex sink) const

FlowQuantity OptimalFlow() const

SimpleMaxFlow(const SimpleMaxFlow &)=delete

void SetArcCapacity(ArcIndex arc, FlowQuantity capacity)

void GetSinkSideMinCut(std::vector< NodeIndex > *result)

int32_t NodeIndex

Definition max_flow.h:35

NodeIndex Tail(ArcIndex arc) const

ArcIndex AddArcWithCapacity(NodeIndex tail, NodeIndex head, FlowQuantity capacity)

NodeIndex NumNodes() const

Status

Definition max_flow.h:71

@ BAD_RESULT

Definition max_flow.h:85

@ POSSIBLE_OVERFLOW

Definition max_flow.h:81

@ BAD_INPUT

Definition max_flow.h:83

@ OPTIMAL

Definition max_flow.h:74

NodeIndex Head(ArcIndex arc) const

Status Solve(NodeIndex source, NodeIndex sink)

FlowQuantity Capacity(ArcIndex arc) const

int32_t ArcIndex

Definition max_flow.h:36

FlowQuantity Flow(ArcIndex arc) const

int64_t FlowQuantity

Definition max_flow.h:37

void GetSourceSideMinCut(std::vector< NodeIndex > *result)

BlossomGraph::NodeIndex NodeIndex

util::ReverseArcStaticGraph Graph