OR-Tools  9.6
PiecewiseLinearFunction

Detailed Description

Definition at line 102 of file piecewise_linear_function.h.

Public Member Functions

bool InDomain (int64_t x) const
 
bool IsConvex () const
 
bool IsNonDecreasing () const
 
bool IsNonIncreasing () const
 
int64_t Value (int64_t x) const
 
int64_t GetMaximum () const
 
int64_t GetMinimum () const
 
int64_t GetMaximum (int64_t range_start, int64_t range_end) const
 
int64_t GetMinimum (int64_t range_start, int64_t range_end) const
 
std::pair< int64_t, int64_t > GetSmallestRangeGreaterThanValue (int64_t range_start, int64_t range_end, int64_t value) const
 
std::pair< int64_t, int64_t > GetSmallestRangeLessThanValue (int64_t range_start, int64_t range_end, int64_t value) const
 
std::pair< int64_t, int64_t > GetSmallestRangeInValueRange (int64_t range_start, int64_t range_end, int64_t value_min, int64_t value_max) const
 
void AddConstantToX (int64_t constant)
 
void AddConstantToY (int64_t constant)
 
void Add (const PiecewiseLinearFunction &other)
 
void Subtract (const PiecewiseLinearFunction &other)
 
std::vector< PiecewiseLinearFunction * > DecomposeToConvexFunctions () const
 
const std::vector< PiecewiseSegment > & segments () const
 
std::string DebugString () const
 

Static Public Member Functions

static PiecewiseLinearFunctionCreatePiecewiseLinearFunction (std::vector< int64_t > points_x, std::vector< int64_t > points_y, std::vector< int64_t > slopes, std::vector< int64_t > other_points_x)
 
static PiecewiseLinearFunctionCreateStepFunction (std::vector< int64_t > points_x, std::vector< int64_t > points_y, std::vector< int64_t > other_points_x)
 
static PiecewiseLinearFunctionCreateFullDomainFunction (int64_t initial_level, std::vector< int64_t > points_x, std::vector< int64_t > slopes)
 
static PiecewiseLinearFunctionCreateOneSegmentFunction (int64_t point_x, int64_t point_y, int64_t slope, int64_t other_point_x)
 
static PiecewiseLinearFunctionCreateRightRayFunction (int64_t point_x, int64_t point_y, int64_t slope)
 
static PiecewiseLinearFunctionCreateLeftRayFunction (int64_t point_x, int64_t point_y, int64_t slope)
 
static PiecewiseLinearFunctionCreateFixedChargeFunction (int64_t slope, int64_t value)
 
static PiecewiseLinearFunctionCreateEarlyTardyFunction (int64_t reference, int64_t earliness_slope, int64_t tardiness_slope)
 
static PiecewiseLinearFunctionCreateEarlyTardyFunctionWithSlack (int64_t early_slack, int64_t late_slack, int64_t earliness_slope, int64_t tardiness_slope)
 

Static Public Attributes

static const int kNotFound = -1
 

Member Function Documentation

◆ Add()

void Add ( const PiecewiseLinearFunction other)

Definition at line 636 of file piecewise_linear_function.cc.

◆ AddConstantToX()

void AddConstantToX ( int64_t  constant)

Definition at line 622 of file piecewise_linear_function.cc.

◆ AddConstantToY()

void AddConstantToY ( int64_t  constant)

Definition at line 629 of file piecewise_linear_function.cc.

◆ CreateEarlyTardyFunction()

PiecewiseLinearFunction * CreateEarlyTardyFunction ( int64_t  reference,
int64_t  earliness_slope,
int64_t  tardiness_slope 
)
static

Definition at line 384 of file piecewise_linear_function.cc.

◆ CreateEarlyTardyFunctionWithSlack()

PiecewiseLinearFunction * CreateEarlyTardyFunctionWithSlack ( int64_t  early_slack,
int64_t  late_slack,
int64_t  earliness_slope,
int64_t  tardiness_slope 
)
static

Definition at line 395 of file piecewise_linear_function.cc.

◆ CreateFixedChargeFunction()

PiecewiseLinearFunction * CreateFixedChargeFunction ( int64_t  slope,
int64_t  value 
)
static

Definition at line 374 of file piecewise_linear_function.cc.

◆ CreateFullDomainFunction()

PiecewiseLinearFunction * CreateFullDomainFunction ( int64_t  initial_level,
std::vector< int64_t >  points_x,
std::vector< int64_t >  slopes 
)
static

Definition at line 327 of file piecewise_linear_function.cc.

◆ CreateLeftRayFunction()

PiecewiseLinearFunction * CreateLeftRayFunction ( int64_t  point_x,
int64_t  point_y,
int64_t  slope 
)
static

Definition at line 367 of file piecewise_linear_function.cc.

◆ CreateOneSegmentFunction()

PiecewiseLinearFunction * CreateOneSegmentFunction ( int64_t  point_x,
int64_t  point_y,
int64_t  slope,
int64_t  other_point_x 
)
static

Definition at line 351 of file piecewise_linear_function.cc.

◆ CreatePiecewiseLinearFunction()

PiecewiseLinearFunction * CreatePiecewiseLinearFunction ( std::vector< int64_t >  points_x,
std::vector< int64_t >  points_y,
std::vector< int64_t >  slopes,
std::vector< int64_t >  other_points_x 
)
static

Definition at line 294 of file piecewise_linear_function.cc.

◆ CreateRightRayFunction()

PiecewiseLinearFunction * CreateRightRayFunction ( int64_t  point_x,
int64_t  point_y,
int64_t  slope 
)
static

Definition at line 360 of file piecewise_linear_function.cc.

◆ CreateStepFunction()

PiecewiseLinearFunction * CreateStepFunction ( std::vector< int64_t >  points_x,
std::vector< int64_t >  points_y,
std::vector< int64_t >  other_points_x 
)
static

Definition at line 311 of file piecewise_linear_function.cc.

◆ DebugString()

std::string DebugString ( ) const

Definition at line 678 of file piecewise_linear_function.cc.

◆ DecomposeToConvexFunctions()

std::vector< PiecewiseLinearFunction * > DecomposeToConvexFunctions ( ) const

Definition at line 645 of file piecewise_linear_function.cc.

◆ GetMaximum() [1/2]

int64_t GetMaximum ( ) const

Definition at line 512 of file piecewise_linear_function.cc.

◆ GetMaximum() [2/2]

int64_t GetMaximum ( int64_t  range_start,
int64_t  range_end 
) const

Definition at line 444 of file piecewise_linear_function.cc.

◆ GetMinimum() [1/2]

int64_t GetMinimum ( ) const

Definition at line 516 of file piecewise_linear_function.cc.

◆ GetMinimum() [2/2]

int64_t GetMinimum ( int64_t  range_start,
int64_t  range_end 
) const

Definition at line 478 of file piecewise_linear_function.cc.

◆ GetSmallestRangeGreaterThanValue()

std::pair< int64_t, int64_t > GetSmallestRangeGreaterThanValue ( int64_t  range_start,
int64_t  range_end,
int64_t  value 
) const

Definition at line 521 of file piecewise_linear_function.cc.

◆ GetSmallestRangeInValueRange()

std::pair< int64_t, int64_t > GetSmallestRangeInValueRange ( int64_t  range_start,
int64_t  range_end,
int64_t  value_min,
int64_t  value_max 
) const

Definition at line 596 of file piecewise_linear_function.cc.

◆ GetSmallestRangeLessThanValue()

std::pair< int64_t, int64_t > GetSmallestRangeLessThanValue ( int64_t  range_start,
int64_t  range_end,
int64_t  value 
) const

Definition at line 528 of file piecewise_linear_function.cc.

◆ InDomain()

bool InDomain ( int64_t  x) const

Definition at line 408 of file piecewise_linear_function.cc.

◆ IsConvex()

bool IsConvex ( ) const

Definition at line 419 of file piecewise_linear_function.cc.

◆ IsNonDecreasing()

bool IsNonDecreasing ( ) const

Definition at line 424 of file piecewise_linear_function.cc.

◆ IsNonIncreasing()

bool IsNonIncreasing ( ) const

Definition at line 429 of file piecewise_linear_function.cc.

◆ segments()

const std::vector<PiecewiseSegment>& segments ( ) const
inline

Definition at line 239 of file piecewise_linear_function.h.

◆ Subtract()

void Subtract ( const PiecewiseLinearFunction other)

Definition at line 640 of file piecewise_linear_function.cc.

◆ Value()

int64_t Value ( int64_t  x) const

Definition at line 434 of file piecewise_linear_function.cc.

Member Data Documentation

◆ kNotFound

const int kNotFound = -1
static

Definition at line 104 of file piecewise_linear_function.h.


The documentation for this class was generated from the following files: