Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
optional Union Reference

#include <2d_rectangle_presolve.h>

Detailed Description

Given two vectors of non-overlapping rectangles defining two regions of the space: one mandatory region that must be occupied and one optional region that can be occupied, try to build a vector of as few non-overlapping rectangles as possible defining a region R that satisfy:

  • R \subset (mandatory
  • mandatory \subset R.

The function updates the vector of mandatory_rectangles with R and optional_rectangles with optional_rectangles \setdiff R. It returns true if the mandatory_rectangles was updated.

This function uses a greedy algorithm that merge rectangles that share an edge.


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