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

#include <diffn_util.h>

Public Types

enum  Corner { BOTTOM_LEFT = 0 , TOP_LEFT = 1 , BOTTOM_RIGHT = 2 , TOP_RIGHT = 3 }
 

Public Member Functions

bool operator== (const RectangleInRange &other) const
 
Rectangle GetAtCorner (Corner p) const
 
Rectangle GetBoudingBox () const
 
Rectangle GetMinimumIntersection (const Rectangle &containing_area) const
 Returns an empty rectangle if it is possible for no intersection to happen.
 
IntegerValue GetMinimumIntersectionArea (const Rectangle &containing_area) const
 
Rectangle GetMandatoryRegion () const
 

Static Public Member Functions

static RectangleInRange BiggestWithMinIntersection (const Rectangle &containing_area, const RectangleInRange &original, const IntegerValue &min_intersect_x, const IntegerValue &min_intersect_y)
 

Public Attributes

int box_index
 
Rectangle bounding_area
 
IntegerValue x_size
 
IntegerValue y_size
 

Friends

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

Detailed Description

A rectangle of size (x_size, y_size) that can freely move inside the bounding_area rectangle.

Definition at line 423 of file diffn_util.h.

Member Enumeration Documentation

◆ Corner

Enumerator
BOTTOM_LEFT 
TOP_LEFT 
BOTTOM_RIGHT 
TOP_RIGHT 

Definition at line 429 of file diffn_util.h.

Member Function Documentation

◆ BiggestWithMinIntersection()

static RectangleInRange operations_research::sat::RectangleInRange::BiggestWithMinIntersection ( const Rectangle & containing_area,
const RectangleInRange & original,
const IntegerValue & min_intersect_x,
const IntegerValue & min_intersect_y )
inlinestatic

We cannot intersect more units than the whole item.

Units that can not intersect per dimension.

Definition at line 512 of file diffn_util.h.

◆ GetAtCorner()

Rectangle operations_research::sat::RectangleInRange::GetAtCorner ( Corner p) const
inline

Returns the position of the rectangle fixed to one of the corner of its range.

Definition at line 444 of file diffn_util.h.

◆ GetBoudingBox()

Rectangle operations_research::sat::RectangleInRange::GetBoudingBox ( ) const
inline

Definition at line 469 of file diffn_util.h.

◆ GetMandatoryRegion()

Rectangle operations_research::sat::RectangleInRange::GetMandatoryRegion ( ) const
inline

Weird math to avoid overflow.

Definition at line 500 of file diffn_util.h.

◆ GetMinimumIntersection()

Rectangle operations_research::sat::RectangleInRange::GetMinimumIntersection ( const Rectangle & containing_area) const
inline

Returns an empty rectangle if it is possible for no intersection to happen.

Definition at line 472 of file diffn_util.h.

◆ GetMinimumIntersectionArea()

IntegerValue operations_research::sat::RectangleInRange::GetMinimumIntersectionArea ( const Rectangle & containing_area) const
inline

Definition at line 490 of file diffn_util.h.

◆ operator==()

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

Definition at line 436 of file diffn_util.h.

Friends And Related Symbol Documentation

◆ AbslStringify

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

Definition at line 541 of file diffn_util.h.

Member Data Documentation

◆ bounding_area

Rectangle operations_research::sat::RectangleInRange::bounding_area

Definition at line 425 of file diffn_util.h.

◆ box_index

int operations_research::sat::RectangleInRange::box_index

Definition at line 424 of file diffn_util.h.

◆ x_size

IntegerValue operations_research::sat::RectangleInRange::x_size

Definition at line 426 of file diffn_util.h.

◆ y_size

IntegerValue operations_research::sat::RectangleInRange::y_size

Definition at line 427 of file diffn_util.h.


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