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

#include <2d_rectangle_presolve.h>

Classes

class  CompareClockwise
 

Public Member Functions

 Neighbours (absl::Span< const Rectangle > rectangles, absl::Span< const std::tuple< int, EdgePosition, int > > neighbors)
 
int NumRectangles () const
 
absl::Span< const int > GetSortedNeighbors (int rectangle_index, EdgePosition edge) const
 Neighbors are sorted in the clockwise order.
 

Detailed Description

Given a set of non-overlapping rectangles, precompute a data-structure that allow for each rectangle to find the adjacent rectangle along an edge.

Note
it only consider adjacent rectangles whose segments has a intersection of non-zero size. In particular, rectangles as following are not considered adjacent:




+++++++++ +++++++++ +++++++++ +++++++++

Precondition: All rectangles must be disjoint.

Definition at line 166 of file 2d_rectangle_presolve.h.

Constructor & Destructor Documentation

◆ Neighbours()

operations_research::sat::Neighbours::Neighbours ( absl::Span< const Rectangle > rectangles,
absl::Span< const std::tuple< int, EdgePosition, int > > neighbors )
inlineexplicit

Definition at line 187 of file 2d_rectangle_presolve.h.

Member Function Documentation

◆ GetSortedNeighbors()

absl::Span< const int > operations_research::sat::Neighbours::GetSortedNeighbors ( int rectangle_index,
EdgePosition edge ) const
inline

Neighbors are sorted in the clockwise order.

Definition at line 207 of file 2d_rectangle_presolve.h.

◆ NumRectangles()

int operations_research::sat::Neighbours::NumRectangles ( ) const
inline

Definition at line 204 of file 2d_rectangle_presolve.h.


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