48#ifndef OR_TOOLS_GRAPH_ASSIGNMENT_H_
49#define OR_TOOLS_GRAPH_ASSIGNMENT_H_
76 arc_tail_.reserve(num_arcs);
77 arc_head_.reserve(num_arcs);
78 arc_cost_.reserve(num_arcs);
127 return arc_head_[assignment_arcs_[left_node]];
133 return arc_cost_[assignment_arcs_[left_node]];
138 std::vector<NodeIndex> arc_tail_;
139 std::vector<NodeIndex> arc_head_;
140 std::vector<CostValue> arc_cost_;
141 std::vector<ArcIndex> assignment_arcs_;
ArcIndex NumArcs() const
Returns the current number of arcs in the graph.
SimpleLinearSumAssignment(const SimpleLinearSumAssignment &)=delete
This type is neither copyable nor movable.
SimpleLinearSumAssignment()
NodeIndex RightMate(NodeIndex left_node) const
NodeIndex NumNodes() const
NodeIndex RightNode(ArcIndex arc) const
CostValue OptimalCost() const
void ReserveArcs(ArcIndex num_arcs)
ArcIndex AddArcWithCost(NodeIndex left_node, NodeIndex right_node, CostValue cost)
CostValue AssignmentCost(NodeIndex left_node) const
NodeIndex LeftNode(ArcIndex arc) const
SimpleLinearSumAssignment & operator=(const SimpleLinearSumAssignment &)=delete
In SWIG mode, we don't want anything besides these top-level includes.
double Cost
Basic non-strict type for cost. The speed penalty for using double is ~2%.