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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48#ifndef ORTOOLS_GRAPH_ASSIGNMENT_H_

49#define ORTOOLS_GRAPH_ASSIGNMENT_H_

50

51#include <cstdint>

52#include <vector>

53

55

57 public:

61

62

63

65

66#ifndef SWIG

67

70 delete;

71#endif

72

73

74

76 arc_tail_.reserve(num_arcs);

77 arc_head_.reserve(num_arcs);

78 arc_cost_.reserve(num_arcs);

79 }

80

81

82

83

84

85

86

89

90

91

92

94

95

97

98

99

103

104

105

112

113

114

116

117

118

119

120

121

122

123

124

125

127 return arc_head_[assignment_arcs_[left_node]];

128 }

129

130

131

133 return arc_cost_[assignment_arcs_[left_node]];

134 }

135

136 private:

138 std::vector<NodeIndex> arc_tail_;

139 std::vector<NodeIndex> arc_head_;

140 std::vector<CostValue> arc_cost_;

141 std::vector<ArcIndex> assignment_arcs_;

143};

144

145}

146

147#endif

SimpleLinearSumAssignment(const SimpleLinearSumAssignment &)=delete

SimpleLinearSumAssignment()

int64_t CostValue

Definition assignment.h:60

NodeIndex RightMate(NodeIndex left_node) const

Definition assignment.h:126

NodeIndex NumNodes() const

NodeIndex RightNode(ArcIndex arc) const

CostValue OptimalCost() const

Definition assignment.h:115

void ReserveArcs(ArcIndex num_arcs)

Definition assignment.h:75

int32_t NodeIndex

Definition assignment.h:58

ArcIndex AddArcWithCost(NodeIndex left_node, NodeIndex right_node, CostValue cost)

Status

Definition assignment.h:106

@ OPTIMAL

Definition assignment.h:107

@ POSSIBLE_OVERFLOW

Definition assignment.h:109

@ INFEASIBLE

Definition assignment.h:108

int32_t ArcIndex

Definition assignment.h:59

CostValue AssignmentCost(NodeIndex left_node) const

Definition assignment.h:132

NodeIndex LeftNode(ArcIndex arc) const

SimpleLinearSumAssignment & operator=(const SimpleLinearSumAssignment &)=delete

BlossomGraph::CostValue CostValue

BlossomGraph::NodeIndex NodeIndex