dReal4
|
Represents a n-dimensional interval vector. More...
#include </home/soonhokong/work/dreal4/dreal/util/box.h>
Public Types | |
using | Interval = ibex::Interval |
using | IntervalVector = ibex::IntervalVector |
Public Member Functions | |
Box () | |
Constructs a zero-dimensional box. | |
Box (const std::vector< Variable > &variables) | |
Constructs a box from variables . | |
Box (const Box &)=default | |
Default copy constructor. | |
Box (Box &&)=default | |
Default move constructor. | |
Box & | operator= (const Box &)=default |
Default copy assign operator. | |
Box & | operator= (Box &&)=default |
Default move assign operator. | |
~Box ()=default | |
Default destructor. | |
void | Add (const Variable &v) |
Adds v to the box. | |
void | Add (const Variable &v, double lb, double ub) |
Adds v to the box and sets its domain using lb and ub . | |
bool | empty () const |
Checks if this box is empty. | |
void | set_empty () |
Make this box empty. | |
int | size () const |
Returns the size of the box. | |
Interval & | operator[] (int i) |
Returns i -th interval in the box. | |
Interval & | operator[] (const Variable &var) |
Returns an interval associated with var . | |
const Interval & | operator[] (int i) const |
Returns i -th interval in the box. | |
const Interval & | operator[] (const Variable &var) const |
Returns an interval associated with var . | |
const std::vector< Variable > & | variables () const |
Returns the variables in the box. | |
const Variable & | variable (int i) const |
Returns i-th variable in the box. | |
bool | has_variable (const Variable &var) const |
Checks if this box has var . | |
const IntervalVector & | interval_vector () const |
Returns the interval vector of the box. | |
IntervalVector & | mutable_interval_vector () |
Returns the interval vector of the box. | |
int | index (const Variable &var) const |
Returns the index associated with var . | |
std::pair< double, int > | MaxDiam () const |
Returns the max diameter of the box and the associated index . | |
std::pair< Box, Box > | bisect (int i) const |
Bisects the box at i -th dimension. More... | |
std::pair< Box, Box > | bisect (const Variable &var) const |
Bisects the box at the dimension represented by var . More... | |
Box & | InplaceUnion (const Box &b) |
Updates the current box by taking union with b . More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Box &box) |
Represents a n-dimensional interval vector.
This is a wrapper of ibex::IntervalVector.
Bisects the box at i
-th dimension.
std::runtime | if i -th dimension is not bisectable. |
Bisects the box at the
dimension represented by var
.
std::runtime | if i -th dimension is not bisectable. |
Updates the current box by taking union with b
.