Google OR-Tools v9.11
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 SizeX () const
 
IntegerValue SizeY () const
 
bool IsDisjoint (const Rectangle &other) const
 
Rectangle Intersect (const Rectangle &other) const
 Returns an empty rectangle if no intersection.
 
IntegerValue IntersectArea (const Rectangle &other) const
 
absl::InlinedVector< Rectangle, 4 > SetDifference (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 40 of file diffn_util.h.

Member Function Documentation

◆ Area()

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

Definition at line 53 of file diffn_util.h.

◆ GetEmpty()

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

Definition at line 79 of file diffn_util.h.

◆ GrowToInclude()

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

Definition at line 46 of file diffn_util.h.

◆ Intersect()

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

Returns an empty rectangle if no intersection.

Definition at line 87 of file diffn_util.h.

◆ IntersectArea()

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

Definition at line 103 of file diffn_util.h.

◆ IsDisjoint()

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

Definition at line 48 of file diffn_util.cc.

◆ operator==()

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

Definition at line 74 of file diffn_util.h.

◆ SetDifference()

absl::InlinedVector< Rectangle, 4 > operations_research::sat::Rectangle::SetDifference ( 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 53 of file diffn_util.cc.

◆ SizeX()

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

Definition at line 55 of file diffn_util.h.

◆ SizeY()

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

Definition at line 56 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 69 of file diffn_util.h.

Member Data Documentation

◆ x_max

IntegerValue operations_research::sat::Rectangle::x_max

Definition at line 42 of file diffn_util.h.

◆ x_min

IntegerValue operations_research::sat::Rectangle::x_min

Definition at line 41 of file diffn_util.h.

◆ y_max

IntegerValue operations_research::sat::Rectangle::y_max

Definition at line 44 of file diffn_util.h.

◆ y_min

IntegerValue operations_research::sat::Rectangle::y_min

Definition at line 43 of file diffn_util.h.


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