34 #ifndef ACADO_TOOLKIT_INTERVAL_HPP 35 #define ACADO_TOOLKIT_INTERVAL_HPP 96 friend double mid (
const double,
const double,
const double,
int& );
144 Interval(
const double l_,
const double u_ ):
_l(l_<u_?l_:u_),
_u(l_<u_?u_:l_) {}
153 const double&
l()
const{
return _l; }
156 const double&
u()
const{
return _u; }
165 void print()
const{ std::cout << *
this <<
"\n"; }
174 double mid(
const double convRel,
const double concRel,
const double valCut,
int &indexMid )
const;
175 double xlog(
const double x )
const{
return x*(
::log(x)); }
185 #include <acado/set_arithmetics/interval.ipp> 187 #endif // ACADO_TOOLKIT_INTERVAL_HPP friend Interval inv(const Interval &)
friend double abs(const Interval &)
friend Interval sqr(const Interval &)
friend Interval operator+(const Interval &)
friend Interval pow(const Interval &, const int)
Interval & operator+=(const Interval &I)
friend bool operator==(const Interval &, const Interval &)
friend Interval operator/(const Interval &, const Interval &)
const double & l() const
Returns the lower bounding value.
friend Interval operator*(const Interval &, const Interval &)
friend Interval xlog(const Interval &)
friend Interval operator-(const Interval &)
Interval(const double l_, const double u_)
Constructor for a variable that belongs to the interval [l,u].
BooleanType isCompact() const
friend bool operator>=(const Interval &, const Interval &)
friend Interval tan(const Interval &)
#define CLOSE_NAMESPACE_ACADO
Interval()
Default constructor.
Implements a rudimentary interval class.
friend Interval fabs(const Interval &)
friend Interval cos(const Interval &)
Interval(const double c)
Constructor for a constant value c
Interval & operator/=(const Interval &I)
Interval & operator-=(const Interval &I)
friend Interval asin(const Interval &)
Interval & operator*=(const Interval &I)
Interval(const Interval &I)
Copy constructor.
friend Interval max(const Interval &, const Interval &)
friend bool operator!=(const Interval &, const Interval &)
Interval & operator+=(const double c)
Interval & operator=(const double c)
friend Interval sin(const Interval &)
friend Interval hull(const Interval &, const Interval &)
const double & u() const
Returns the upper bounding value.
friend Interval min(const Interval &, const Interval &)
friend Interval exp(const Interval &)
friend bool operator<=(const Interval &, const Interval &)
friend bool inter(Interval &, const Interval &, const Interval &)
void l(const double lb)
Sets the lower bound.
friend Interval sqrt(const Interval &)
friend Interval arh(const Interval &, const double)
friend Interval atan(const Interval &)
friend bool operator>(const Interval &, const Interval &)
friend Interval acos(const Interval &)
friend std::ostream & operator<<(std::ostream &, const Interval &)
#define BEGIN_NAMESPACE_ACADO
double xlog(const double x) const
Interval & operator-=(const double c)
friend double diam(const Interval &)
Interval & operator/=(const double c)
void u(const double ub)
Sets the upper bound.
friend double mid(const Interval &)
friend Interval log(const Interval &)
Interval & operator*=(const double c)
friend bool operator<(const Interval &, const Interval &)