# SCIP

Solving Constraint Integer Programs

polyscip::RectangularBox Class Reference

## Detailed Description

A rectangular box R = [a_1,e_1) x ... x [a_k,e_k) is a k-ary Cartesian product of half-open intervals.

Definition at line 184 of file polyscip.h.

A rectangular box R = [a_1,e_1) x ... x [a_k,e_k) is a k-ary Cartesian product of half-open intervals. More...

#include <polyscip.h>

## Public Types

using Interval = std::pair< ValueType, ValueType >
Interval I = [a,b) More...

## Public Member Functions

RectangularBox (const std::vector< Interval > &box)

RectangularBox (std::vector< Interval > &&box)

bool isSupersetOf (const RectangularBox &other) const

bool isSubsetOf (const RectangularBox &other) const

bool isDisjointFrom (const RectangularBox &other) const

bool isFeasible (double epsilon) const

std::vector< RectangularBoxgetDisjointPartsFrom (double delta, const RectangularBox &other) const

std::size_t size () const

Interval getInterval (std::size_t index) const

bool isDominated (const OutcomeType &outcome) const

## Friends

std::ostream & operator<< (std::ostream &os, const RectangularBox &box)

## ◆ Interval

 using polyscip::RectangularBox::Interval = std::pair

Interval I = [a,b)

Definition at line 186 of file polyscip.h.

## ◆ RectangularBox() [1/2]

 polyscip::RectangularBox::RectangularBox ( const std::vector< Interval > & box )
explicit

Copy constructor

Parameters
 box RectangularBox to copy

Definition at line 230 of file polyscip.cpp.

Referenced by getDisjointPartsFrom(), and RectangularBox().

## ◆ RectangularBox() [2/2]

 polyscip::RectangularBox::RectangularBox ( std::vector< Interval > && box )
explicit

Move constructor

Parameters
 box RectangularBox to copy

Definition at line 238 of file polyscip.cpp.

References RectangularBox().

## ◆ isSupersetOf()

 bool polyscip::RectangularBox::isSupersetOf ( const RectangularBox & other ) const

Indicates whether given box is subset

Parameters
 other Box to compare
Returns
true if 'other' is subset; false otherwise

Definition at line 296 of file polyscip.cpp.

## ◆ isSubsetOf()

 bool polyscip::RectangularBox::isSubsetOf ( const RectangularBox & other ) const

Indicates whether given box is superset

Parameters
 other Box to compare
Returns
true if 'other' is superset; false otherwise

Definition at line 310 of file polyscip.cpp.

## ◆ isDisjointFrom()

 bool polyscip::RectangularBox::isDisjointFrom ( const RectangularBox & other ) const

Indicates whether given box is disjoint

Parameters
 other Box to compare
Returns
true if 'other' is disjoint; false otherwise

Definition at line 324 of file polyscip.cpp.

## ◆ isFeasible()

 bool polyscip::RectangularBox::isFeasible ( double epsilon ) const

Indicates whether a_i + epsilon > e_i for all i

Parameters
 epsilon Value to add to left interval limit
Returns
true if a_i + epsilon <= e_i for all i; false otherwise

Definition at line 340 of file polyscip.cpp.

Referenced by polyscip::Polyscip::computeNondomPoints().

## ◆ getDisjointPartsFrom()

 vector< RectangularBox > polyscip::RectangularBox::getDisjointPartsFrom ( double delta, const RectangularBox & other ) const

Makes disjoint rectangular boxes with respect to given box

Parameters
 delta Feasibility threshold other Box to compare to
Returns
Container of disjoint boxes

Definition at line 383 of file polyscip.cpp.

References RectangularBox(), and size().

## ◆ size()

 size_t polyscip::RectangularBox::size ( ) const

Get get number of intervals

Returns
Dimension of rectangular box

Definition at line 264 of file polyscip.cpp.

Referenced by polyscip::Polyscip::computeNondomPoints(), getDisjointPartsFrom(), and getInterval().

## ◆ getInterval()

 RectangularBox::Interval polyscip::RectangularBox::getInterval ( std::size_t index ) const

Get interval of box

Parameters
 index Corresponding interval index
Returns
Interval corresponding to index

Definition at line 273 of file polyscip.cpp.

References size().

Referenced by polyscip::Polyscip::computeNondomPoints().

## ◆ isDominated()

 bool polyscip::RectangularBox::isDominated ( const OutcomeType & outcome ) const

Indicates whether outcome dominates entire box

Parameters
 outcome Outcome to compare to
Returns
true if given outcome dominates entire box; false otherwise

Definition at line 353 of file polyscip.cpp.

## ◆ operator<<

 std::ostream& operator<< ( std::ostream & os, const RectangularBox & box )
friend

Ostream operator

Parameters
 os Output stream to write to box Box to write to stream
Returns
Output stream

Definition at line 284 of file polyscip.cpp.