Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: routing_types
Note: This documentation is automatically generated.
Defining common types used in the routing library outside the main RoutingModel class has several purposes: 1) It allows some small libraries to avoid a dependency on routing.{h,cc}, eg. routing_neighborhoods.h. 2) It allows an easier wrapping via SWIG, which can have issues with intra-class types.
Users that depend on routing.{h,cc} should just use the RoutingModel:: equivalent, eg. RoutingModel::NodeIndex.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eCommon routing types are defined outside the main RoutingModel class for easier integration with smaller libraries and SWIG wrapping.\u003c/p\u003e\n"],["\u003cp\u003eUsers who already depend on the main routing library files should use the equivalent types within the RoutingModel class, such as RoutingModel::NodeIndex.\u003c/p\u003e\n"],["\u003cp\u003eSeveral basic integer types like RoutingNodeIndex, RoutingCostClassIndex are defined using the \u003ccode\u003eDEFINE_INT_TYPE\u003c/code\u003e macro.\u003c/p\u003e\n"]]],["The documentation defines common types for the routing library, independent of the `RoutingModel` class, to avoid dependencies and simplify SWIG wrapping. It outlines the use of the `DEFINE_INT_TYPE` function to define specific integer-based types. The defined types include `RoutingNodeIndex`, `RoutingCostClassIndex`, `RoutingDimensionIndex`, `RoutingDisjunctionIndex`, and `RoutingVehicleClassIndex`. Users directly utilizing `routing.{h,cc}` should opt for the corresponding `RoutingModel::` types. These types are used as arguments.\n"],null,["# routing_types\n\nC++ Reference: routing_types\n============================\n\n\nNote: This documentation is automatically generated.\n\n\u003cbr /\u003e\n\nDefining common types used in the routing library outside the main RoutingModel class has several purposes: 1) It allows some small libraries to avoid a dependency on routing.{h,cc}, eg. routing_neighborhoods.h. 2) It allows an easier wrapping via SWIG, which can have issues with intra-class types. \n\nUsers that depend on routing.{h,cc} should just use the RoutingModel:: equivalent, eg. RoutingModel::NodeIndex.\n\n| Function | Type | Arguments | Comments |\n|-----------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|-----------|----------|\n| [`DEFINE_INT_TYPE`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_types.h#L36) | \u003cbr /\u003e Arguments: `RoutingNodeIndex, int` \u003cbr /\u003e |\n| [`DEFINE_INT_TYPE`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_types.h#L37) | \u003cbr /\u003e Arguments: `RoutingCostClassIndex, int` \u003cbr /\u003e |\n| [`DEFINE_INT_TYPE`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_types.h#L38) | \u003cbr /\u003e Arguments: `RoutingDimensionIndex, int` \u003cbr /\u003e |\n| [`DEFINE_INT_TYPE`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_types.h#L39) | \u003cbr /\u003e Arguments: `RoutingDisjunctionIndex, int` \u003cbr /\u003e |\n| [`DEFINE_INT_TYPE`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_types.h#L40) | \u003cbr /\u003e Arguments: `RoutingVehicleClassIndex, int` \u003cbr /\u003e |"]]