![]() |
OR-Tools
9.6
|
The following struct defines a piecewise linear formulation, with int64_t values for the "anchor" x and y values, and potential double values for the slope of each linear function.
Public Member Functions | |
| std::string | DebugString (std::string line_prefix="") const |
Public Attributes | |
| absl::InlinedVector< int64_t, 8 > | x_anchors |
| The set of increasing anchor cumul values for the interpolation. More... | |
| absl::InlinedVector< int64_t, 8 > | y_anchors |
| The y values used for the interpolation: For any x anchor value, let i be an index such that x_anchors[i] ≤ x < x_anchors[i+1], then the y value for x is y_anchors[i] * (1-λ) + y_anchors[i+1] * λ, with λ = (x - x_anchors[i]) / (x_anchors[i+1] - x_anchors[i]). More... | |
| std::string DebugString | ( | std::string | line_prefix = "" | ) | const |
Definition at line 125 of file routing.cc.
| absl::InlinedVector<int64_t, 8> x_anchors |
| absl::InlinedVector<int64_t, 8> y_anchors |
The y values used for the interpolation: For any x anchor value, let i be an index such that x_anchors[i] ≤ x < x_anchors[i+1], then the y value for x is y_anchors[i] * (1-λ) + y_anchors[i+1] * λ, with λ = (x - x_anchors[i]) / (x_anchors[i+1] - x_anchors[i]).