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

Detailed Description

Definition at line 39 of file piecewise_linear_function.h.

#include <piecewise_linear_function.h>

Public Member Functions

 PiecewiseSegment (int64_t point_x, int64_t point_y, int64_t slope, int64_t other_point_x)
int64_t Value (int64_t x) const
int64_t start_x () const
int64_t end_x () const
int64_t start_y () const
int64_t end_y () const
int64_t slope () const
int64_t intersection_y () const
void ExpandEnd (int64_t end_x)
void AddConstantToX (int64_t constant)
void AddConstantToY (int64_t constant)
std::string DebugString () const

Static Public Member Functions

static bool SortComparator (const PiecewiseSegment &segment1, const PiecewiseSegment &segment2)
static bool FindComparator (int64_t point, const PiecewiseSegment &segment)

Constructor & Destructor Documentation

◆ PiecewiseSegment()

operations_research::PiecewiseSegment::PiecewiseSegment ( int64_t point_x,
int64_t point_y,
int64_t slope,
int64_t other_point_x )

Definition at line 89 of file piecewise_linear_function.cc.

Member Function Documentation

◆ AddConstantToX()

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

Definition at line 253 of file piecewise_linear_function.cc.

◆ AddConstantToY()

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

Definition at line 263 of file piecewise_linear_function.cc.

◆ DebugString()

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

Definition at line 271 of file piecewise_linear_function.cc.

◆ end_x()

int64_t operations_research::PiecewiseSegment::end_x ( ) const
inline

Definition at line 49 of file piecewise_linear_function.h.

◆ end_y()

int64_t operations_research::PiecewiseSegment::end_y ( ) const
inline

Definition at line 53 of file piecewise_linear_function.h.

◆ ExpandEnd()

void operations_research::PiecewiseSegment::ExpandEnd ( int64_t end_x)

Definition at line 249 of file piecewise_linear_function.cc.

◆ FindComparator()

bool operations_research::PiecewiseSegment::FindComparator ( int64_t point,
const PiecewiseSegment & segment )
static

Definition at line 244 of file piecewise_linear_function.cc.

◆ intersection_y()

int64_t operations_research::PiecewiseSegment::intersection_y ( ) const
inline

Definition at line 57 of file piecewise_linear_function.h.

◆ slope()

int64_t operations_research::PiecewiseSegment::slope ( ) const
inline

Definition at line 55 of file piecewise_linear_function.h.

◆ SortComparator()

bool operations_research::PiecewiseSegment::SortComparator ( const PiecewiseSegment & segment1,
const PiecewiseSegment & segment2 )
static

Definition at line 239 of file piecewise_linear_function.cc.

◆ start_x()

int64_t operations_research::PiecewiseSegment::start_x ( ) const
inline

Definition at line 47 of file piecewise_linear_function.h.

◆ start_y()

int64_t operations_research::PiecewiseSegment::start_y ( ) const
inline

Definition at line 51 of file piecewise_linear_function.h.

◆ Value()

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

Definition at line 98 of file piecewise_linear_function.cc.


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