14#ifndef OR_TOOLS_CONSTRAINT_SOLVER_ROUTING_INDEX_MANAGER_H_
15#define OR_TOOLS_CONSTRAINT_SOLVER_ROUTING_INDEX_MANAGER_H_
60 const std::vector<NodeIndex>& starts,
61 const std::vector<NodeIndex>& ends);
64 const std::vector<std::pair<NodeIndex, NodeIndex> >& starts_ends);
75 return vehicle_to_start_[vehicle];
77 int64_t
GetEndIndex(
int vehicle)
const {
return vehicle_to_end_[vehicle]; }
85 return node_to_index_[node];
89 const std::vector<NodeIndex>&
nodes)
const;
95 return index_to_node_[
index];
99 const std::vector<int64_t>& indices)
const;
106 return node_to_index_;
112 const std::vector<std::pair<NodeIndex, NodeIndex> >& starts_ends);
114 std::vector<NodeIndex> index_to_node_;
116 std::vector<int64_t> vehicle_to_start_;
117 std::vector<int64_t> vehicle_to_end_;
120 int num_unique_depots_;
#define DCHECK_GE(val1, val2)
#define DCHECK_LT(val1, val2)
Manager for any NodeIndex <-> variable index conversion.
std::vector< NodeIndex > IndicesToNodes(const std::vector< int64_t > &indices) const
int64_t GetEndIndex(int vehicle) const
int64_t GetStartIndex(int vehicle) const
absl::StrongVector< NodeIndex, int64_t > GetNodeToIndexMap() const
static const int64_t kUnassigned
int num_unique_depots() const
complete.
std::vector< int64_t > NodesToIndices(const std::vector< NodeIndex > &nodes) const
RoutingIndexManager(int num_nodes, int num_vehicles, NodeIndex depot)
Creates a NodeIndex to variable index mapping for a problem containing 'num_nodes',...
NodeIndex IndexToNode(int64_t index) const
std::vector< NodeIndex > GetIndexToNodeMap() const
int64_t NodeToIndex(NodeIndex node) const
RoutingNodeIndex NodeIndex
Collection of objects used to extend the Constraint Solver library.