OR-Tools  8.2
PiecewiseLinearFunction

Detailed Description

Definition at line 101 of file piecewise_linear_function.h.

Public Member Functions

bool InDomain (int64 x) const
 
bool IsConvex () const
 
bool IsNonDecreasing () const
 
bool IsNonIncreasing () const
 
int64 Value (int64 x) const
 
int64 GetMaximum () const
 
int64 GetMinimum () const
 
int64 GetMaximum (int64 range_start, int64 range_end) const
 
int64 GetMinimum (int64 range_start, int64 range_end) const
 
std::pair< int64, int64GetSmallestRangeGreaterThanValue (int64 range_start, int64 range_end, int64 value) const
 
std::pair< int64, int64GetSmallestRangeLessThanValue (int64 range_start, int64 range_end, int64 value) const
 
std::pair< int64, int64GetSmallestRangeInValueRange (int64 range_start, int64 range_end, int64 value_min, int64 value_max) const
 
void AddConstantToX (int64 constant)
 
void AddConstantToY (int64 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 > points_x, std::vector< int64 > points_y, std::vector< int64 > slopes, std::vector< int64 > other_points_x)
 
static PiecewiseLinearFunctionCreateStepFunction (std::vector< int64 > points_x, std::vector< int64 > points_y, std::vector< int64 > other_points_x)
 
static PiecewiseLinearFunctionCreateFullDomainFunction (int64 initial_level, std::vector< int64 > points_x, std::vector< int64 > slopes)
 
static PiecewiseLinearFunctionCreateOneSegmentFunction (int64 point_x, int64 point_y, int64 slope, int64 other_point_x)
 
static PiecewiseLinearFunctionCreateRightRayFunction (int64 point_x, int64 point_y, int64 slope)
 
static PiecewiseLinearFunctionCreateLeftRayFunction (int64 point_x, int64 point_y, int64 slope)
 
static PiecewiseLinearFunctionCreateFixedChargeFunction (int64 slope, int64 value)
 
static PiecewiseLinearFunctionCreateEarlyTardyFunction (int64 reference, int64 earliness_slope, int64 tardiness_slope)
 
static PiecewiseLinearFunctionCreateEarlyTardyFunctionWithSlack (int64 early_slack, int64 late_slack, int64 earliness_slope, int64 tardiness_slope)
 

Static Public Attributes

static const int kNotFound = -1
 

Member Function Documentation

◆ Add()

void Add ( const PiecewiseLinearFunction other)

Definition at line 627 of file piecewise_linear_function.cc.

◆ AddConstantToX()

void AddConstantToX ( int64  constant)

Definition at line 613 of file piecewise_linear_function.cc.

◆ AddConstantToY()

void AddConstantToY ( int64  constant)

Definition at line 620 of file piecewise_linear_function.cc.

◆ CreateEarlyTardyFunction()

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

Definition at line 380 of file piecewise_linear_function.cc.

◆ CreateEarlyTardyFunctionWithSlack()

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

Definition at line 391 of file piecewise_linear_function.cc.

◆ CreateFixedChargeFunction()

PiecewiseLinearFunction * CreateFixedChargeFunction ( int64  slope,
int64  value 
)
static

Definition at line 370 of file piecewise_linear_function.cc.

◆ CreateFullDomainFunction()

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

Definition at line 323 of file piecewise_linear_function.cc.

◆ CreateLeftRayFunction()

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

Definition at line 363 of file piecewise_linear_function.cc.

◆ CreateOneSegmentFunction()

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

Definition at line 347 of file piecewise_linear_function.cc.

◆ CreatePiecewiseLinearFunction()

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

Definition at line 290 of file piecewise_linear_function.cc.

◆ CreateRightRayFunction()

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

Definition at line 356 of file piecewise_linear_function.cc.

◆ CreateStepFunction()

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

Definition at line 307 of file piecewise_linear_function.cc.

◆ DebugString()

std::string DebugString ( ) const

Definition at line 669 of file piecewise_linear_function.cc.

◆ DecomposeToConvexFunctions()

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

Definition at line 636 of file piecewise_linear_function.cc.

◆ GetMaximum() [1/2]

int64 GetMaximum ( ) const

Definition at line 508 of file piecewise_linear_function.cc.

◆ GetMaximum() [2/2]

int64 GetMaximum ( int64  range_start,
int64  range_end 
) const

Definition at line 440 of file piecewise_linear_function.cc.

◆ GetMinimum() [1/2]

int64 GetMinimum ( ) const

Definition at line 512 of file piecewise_linear_function.cc.

◆ GetMinimum() [2/2]

int64 GetMinimum ( int64  range_start,
int64  range_end 
) const

Definition at line 474 of file piecewise_linear_function.cc.

◆ GetSmallestRangeGreaterThanValue()

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

Definition at line 517 of file piecewise_linear_function.cc.

◆ GetSmallestRangeInValueRange()

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

Definition at line 588 of file piecewise_linear_function.cc.

◆ GetSmallestRangeLessThanValue()

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

Definition at line 523 of file piecewise_linear_function.cc.

◆ InDomain()

bool InDomain ( int64  x) const

Definition at line 404 of file piecewise_linear_function.cc.

◆ IsConvex()

bool IsConvex ( ) const

Definition at line 415 of file piecewise_linear_function.cc.

◆ IsNonDecreasing()

bool IsNonDecreasing ( ) const

Definition at line 420 of file piecewise_linear_function.cc.

◆ IsNonIncreasing()

bool IsNonIncreasing ( ) const

Definition at line 425 of file piecewise_linear_function.cc.

◆ segments()

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

Definition at line 243 of file piecewise_linear_function.h.

◆ Subtract()

void Subtract ( const PiecewiseLinearFunction other)

Definition at line 631 of file piecewise_linear_function.cc.

◆ Value()

int64 Value ( int64  x) const

Definition at line 430 of file piecewise_linear_function.cc.

Member Data Documentation

◆ kNotFound

const int kNotFound = -1
static

Definition at line 103 of file piecewise_linear_function.h.


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