C++ Reference

C++ Reference: Routing

RoutingModel::RouteDimensionTravelInfo::TransitionInfo::PiecewiseLinearFormulation

Detailed Description

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.

Definition at line 1352 of file routing.h.

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...
 

Member Function Documentation

◆ DebugString()

std::string DebugString ( std::string  line_prefix = "") const

Member Data Documentation

◆ x_anchors

absl::InlinedVector<int64_t, 8> x_anchors

The set of increasing anchor cumul values for the interpolation.

Definition at line 1354 of file routing.h.

◆ y_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]).

Definition at line 1360 of file routing.h.


The documentation for this struct was generated from the following file: