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

#include <diffn_util.h>

Public Member Functions

void GrowToInclude (const Rectangle &other)
 
IntegerValue Area () const
 
IntegerValue CapArea () const
 
IntegerValue SizeX () const
 
IntegerValue SizeY () const
 
bool IsDisjoint (const Rectangle &other) const
 
Rectangle Intersect (const Rectangle &other) const
 The methods below are not meant to be used with zero-area rectangles.
 
IntegerValue IntersectArea (const Rectangle &other) const
 
bool IsInsideOf (const Rectangle &other) const
 
absl::InlinedVector< Rectangle, 4 > RegionDifference (const Rectangle &other) const
 
bool operator== (const Rectangle &other) const
 
bool operator!= (const Rectangle &other) const
 

Static Public Member Functions

static Rectangle GetEmpty ()
 

Public Attributes

IntegerValue x_min
 
IntegerValue x_max
 
IntegerValue y_min
 
IntegerValue y_max
 

Friends

template<typename Sink>
void AbslStringify (Sink &sink, const Rectangle &r)
 

Detailed Description

Definition at line 44 of file diffn_util.h.

Member Function Documentation

◆ Area()

IntegerValue operations_research::sat::Rectangle::Area ( ) const
inline

Definition at line 57 of file diffn_util.h.

◆ CapArea()

IntegerValue operations_research::sat::Rectangle::CapArea ( ) const
inline

Definition at line 59 of file diffn_util.h.

◆ GetEmpty()

static Rectangle operations_research::sat::Rectangle::GetEmpty ( )
inlinestatic

Definition at line 97 of file diffn_util.h.

◆ GrowToInclude()

void operations_research::sat::Rectangle::GrowToInclude ( const Rectangle & other)
inline

Definition at line 50 of file diffn_util.h.

◆ Intersect()

Rectangle operations_research::sat::Rectangle::Intersect ( const Rectangle & other) const
inline

The methods below are not meant to be used with zero-area rectangles.

Returns an empty rectangle if no intersection.

Definition at line 105 of file diffn_util.h.

◆ IntersectArea()

IntegerValue operations_research::sat::Rectangle::IntersectArea ( const Rectangle & other) const
inline

Definition at line 121 of file diffn_util.h.

◆ IsDisjoint()

bool operations_research::sat::Rectangle::IsDisjoint ( const Rectangle & other) const

Definition at line 57 of file diffn_util.cc.

◆ IsInsideOf()

bool operations_research::sat::Rectangle::IsInsideOf ( const Rectangle & other) const
inline

Definition at line 74 of file diffn_util.h.

◆ operator!=()

bool operations_research::sat::Rectangle::operator!= ( const Rectangle & other) const
inline

Definition at line 95 of file diffn_util.h.

◆ operator==()

bool operations_research::sat::Rectangle::operator== ( const Rectangle & other) const
inline

Definition at line 90 of file diffn_util.h.

◆ RegionDifference()

absl::InlinedVector< Rectangle, 4 > operations_research::sat::Rectangle::RegionDifference ( const Rectangle & other) const

Returns this \ other as a set of disjoint rectangles of non-empty area. The resulting vector will have at most four elements.

4
1 other 2
------—
3

Piece 1

Piece 2

Piece 3

Piece 4

Definition at line 62 of file diffn_util.cc.

◆ SizeX()

IntegerValue operations_research::sat::Rectangle::SizeX ( ) const
inline

Definition at line 63 of file diffn_util.h.

◆ SizeY()

IntegerValue operations_research::sat::Rectangle::SizeY ( ) const
inline

Definition at line 64 of file diffn_util.h.

Friends And Related Symbol Documentation

◆ AbslStringify

template<typename Sink>
void AbslStringify ( Sink & sink,
const Rectangle & r )
friend

Definition at line 85 of file diffn_util.h.

Member Data Documentation

◆ x_max

IntegerValue operations_research::sat::Rectangle::x_max

Definition at line 46 of file diffn_util.h.

◆ x_min

IntegerValue operations_research::sat::Rectangle::x_min

Definition at line 45 of file diffn_util.h.

◆ y_max

IntegerValue operations_research::sat::Rectangle::y_max

Definition at line 48 of file diffn_util.h.

◆ y_min

IntegerValue operations_research::sat::Rectangle::y_min

Definition at line 47 of file diffn_util.h.


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