Class RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation
- java.lang.Object
-
- com.google.ortools.constraintsolver.RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation
-
- Enclosing class:
- RoutingModel.RouteDimensionTravelInfo.TransitionInfo
public static class RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation extends java.lang.ObjectThe 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanswigCMemOwn
-
Constructor Summary
Constructors Constructor Description PiecewiseLinearFormulation()PiecewiseLinearFormulation(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()protected voidfinalize()static longgetCPtr(RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation obj)SWIGTYPE_p_absl__InlinedVectorT_int64_t_8_tgetX_anchors()The set of *increasing* anchor cumul values for the interpolation.SWIGTYPE_p_absl__InlinedVectorT_int64_t_8_tgetY_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]).voidsetX_anchors(SWIGTYPE_p_absl__InlinedVectorT_int64_t_8_t value)The set of *increasing* anchor cumul values for the interpolation.voidsetY_anchors(SWIGTYPE_p_absl__InlinedVectorT_int64_t_8_t value)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]).static longswigRelease(RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation obj)java.lang.StringtoString()java.lang.StringtoString(java.lang.String line_prefix)
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation obj)
-
swigRelease
public static long swigRelease(RoutingModel.RouteDimensionTravelInfo.TransitionInfo.PiecewiseLinearFormulation obj)
-
finalize
protected void finalize()
- Overrides:
finalizein classjava.lang.Object
-
delete
public void delete()
-
setX_anchors
public void setX_anchors(SWIGTYPE_p_absl__InlinedVectorT_int64_t_8_t value)
The set of *increasing* anchor cumul values for the interpolation.
-
getX_anchors
public SWIGTYPE_p_absl__InlinedVectorT_int64_t_8_t getX_anchors()
The set of *increasing* anchor cumul values for the interpolation.
-
setY_anchors
public void setY_anchors(SWIGTYPE_p_absl__InlinedVectorT_int64_t_8_t value)
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]).
-
getY_anchors
public SWIGTYPE_p_absl__InlinedVectorT_int64_t_8_t getY_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]).
-
toString
public java.lang.String toString(java.lang.String line_prefix)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-