Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::ClosedInterval Struct Reference

#include <sorted_interval_list.h>

Public Member Functions

 ClosedInterval ()
 
 ClosedInterval (int64_t s, int64_t e)
 
std::string DebugString () const
 
bool operator== (const ClosedInterval &other) const
 
bool operator< (const ClosedInterval &other) const
 

Public Attributes

int64_t start = 0
 
int64_t end = 0
 

Friends

template<typename H >
AbslHashValue (H h, const ClosedInterval &interval)
 

Detailed Description

Represents a closed interval [start, end]. We must have start <= end.

Definition at line 34 of file sorted_interval_list.h.

Constructor & Destructor Documentation

◆ ClosedInterval() [1/2]

operations_research::ClosedInterval::ClosedInterval ( )
inline

Definition at line 35 of file sorted_interval_list.h.

◆ ClosedInterval() [2/2]

operations_research::ClosedInterval::ClosedInterval ( int64_t s,
int64_t e )
inline

Definition at line 36 of file sorted_interval_list.h.

Member Function Documentation

◆ DebugString()

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

Definition at line 35 of file sorted_interval_list.cc.

◆ operator<()

bool operations_research::ClosedInterval::operator< ( const ClosedInterval & other) const
inline

Because we mainly manipulate vector of disjoint intervals, we only need to sort by the start. We do not care about the order in which interval with the same start appear since they will always be merged into one interval.

Definition at line 49 of file sorted_interval_list.h.

◆ operator==()

bool operations_research::ClosedInterval::operator== ( const ClosedInterval & other) const
inline

Definition at line 42 of file sorted_interval_list.h.

Friends And Related Symbol Documentation

◆ AbslHashValue

template<typename H >
H AbslHashValue ( H h,
const ClosedInterval & interval )
friend

Definition at line 54 of file sorted_interval_list.h.

Member Data Documentation

◆ end

int64_t operations_research::ClosedInterval::end = 0

Definition at line 59 of file sorted_interval_list.h.

◆ start

int64_t operations_research::ClosedInterval::start = 0

Definition at line 58 of file sorted_interval_list.h.


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