Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::PiecewiseLinearFunction Class Reference

Detailed Description

Definition at line 102 of file piecewise_linear_function.h.

#include <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 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 PiecewiseLinearFunction * CreateStepFunction (std::vector< int64_t > points_x, std::vector< int64_t > points_y, std::vector< int64_t > other_points_x)
static PiecewiseLinearFunction * CreateFullDomainFunction (int64_t initial_level, std::vector< int64_t > points_x, std::vector< int64_t > slopes)
static PiecewiseLinearFunction * CreateOneSegmentFunction (int64_t point_x, int64_t point_y, int64_t slope, int64_t other_point_x)
static PiecewiseLinearFunction * CreateRightRayFunction (int64_t point_x, int64_t point_y, int64_t slope)
static PiecewiseLinearFunction * CreateLeftRayFunction (int64_t point_x, int64_t point_y, int64_t slope)
static PiecewiseLinearFunction * CreateFixedChargeFunction (int64_t slope, int64_t value)
static PiecewiseLinearFunction * CreateEarlyTardyFunction (int64_t reference, int64_t earliness_slope, int64_t tardiness_slope)
static PiecewiseLinearFunction * CreateEarlyTardyFunctionWithSlack (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 operations_research::PiecewiseLinearFunction::Add ( const PiecewiseLinearFunction & other)

Definition at line 646 of file piecewise_linear_function.cc.

◆ AddConstantToX()

void operations_research::PiecewiseLinearFunction::AddConstantToX ( int64_t constant)

Definition at line 632 of file piecewise_linear_function.cc.

◆ AddConstantToY()

void operations_research::PiecewiseLinearFunction::AddConstantToY ( int64_t constant)

Definition at line 639 of file piecewise_linear_function.cc.

◆ CreateEarlyTardyFunction()

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

Definition at line 394 of file piecewise_linear_function.cc.

◆ CreateEarlyTardyFunctionWithSlack()

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

Definition at line 405 of file piecewise_linear_function.cc.

◆ CreateFixedChargeFunction()

PiecewiseLinearFunction * operations_research::PiecewiseLinearFunction::CreateFixedChargeFunction ( int64_t slope,
int64_t value )
static

Definition at line 384 of file piecewise_linear_function.cc.

◆ CreateFullDomainFunction()

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

Definition at line 337 of file piecewise_linear_function.cc.

◆ CreateLeftRayFunction()

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

Definition at line 377 of file piecewise_linear_function.cc.

◆ CreateOneSegmentFunction()

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

Definition at line 361 of file piecewise_linear_function.cc.

◆ CreatePiecewiseLinearFunction()

PiecewiseLinearFunction * operations_research::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 304 of file piecewise_linear_function.cc.

◆ CreateRightRayFunction()

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

Definition at line 370 of file piecewise_linear_function.cc.

◆ CreateStepFunction()

PiecewiseLinearFunction * operations_research::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 321 of file piecewise_linear_function.cc.

◆ DebugString()

std::string operations_research::PiecewiseLinearFunction::DebugString ( ) const

Definition at line 688 of file piecewise_linear_function.cc.

◆ DecomposeToConvexFunctions()

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

Definition at line 655 of file piecewise_linear_function.cc.

◆ GetMaximum() [1/2]

int64_t operations_research::PiecewiseLinearFunction::GetMaximum ( ) const

Definition at line 522 of file piecewise_linear_function.cc.

◆ GetMaximum() [2/2]

int64_t operations_research::PiecewiseLinearFunction::GetMaximum ( int64_t range_start,
int64_t range_end ) const

Definition at line 454 of file piecewise_linear_function.cc.

◆ GetMinimum() [1/2]

int64_t operations_research::PiecewiseLinearFunction::GetMinimum ( ) const

Definition at line 526 of file piecewise_linear_function.cc.

◆ GetMinimum() [2/2]

int64_t operations_research::PiecewiseLinearFunction::GetMinimum ( int64_t range_start,
int64_t range_end ) const

Definition at line 488 of file piecewise_linear_function.cc.

◆ GetSmallestRangeGreaterThanValue()

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

Definition at line 531 of file piecewise_linear_function.cc.

◆ GetSmallestRangeInValueRange()

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

Definition at line 606 of file piecewise_linear_function.cc.

◆ GetSmallestRangeLessThanValue()

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

Definition at line 538 of file piecewise_linear_function.cc.

◆ InDomain()

bool operations_research::PiecewiseLinearFunction::InDomain ( int64_t x) const

Definition at line 418 of file piecewise_linear_function.cc.

◆ IsConvex()

bool operations_research::PiecewiseLinearFunction::IsConvex ( ) const

Definition at line 429 of file piecewise_linear_function.cc.

◆ IsNonDecreasing()

bool operations_research::PiecewiseLinearFunction::IsNonDecreasing ( ) const

Definition at line 434 of file piecewise_linear_function.cc.

◆ IsNonIncreasing()

bool operations_research::PiecewiseLinearFunction::IsNonIncreasing ( ) const

Definition at line 439 of file piecewise_linear_function.cc.

◆ segments()

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

Definition at line 239 of file piecewise_linear_function.h.

◆ Subtract()

void operations_research::PiecewiseLinearFunction::Subtract ( const PiecewiseLinearFunction & other)

Definition at line 650 of file piecewise_linear_function.cc.

◆ Value()

int64_t operations_research::PiecewiseLinearFunction::Value ( int64_t x) const

Definition at line 444 of file piecewise_linear_function.cc.

Member Data Documentation

◆ kNotFound

const int operations_research::PiecewiseLinearFunction::kNotFound = -1
static

Definition at line 104 of file piecewise_linear_function.h.


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