Implements a rudimentary interval class. More...
#include <interval.hpp>
Public Member Functions | |
| Interval () | |
| Default constructor. More... | |
| Interval (const double c) | |
| Constructor for a constant value c More... | |
| Interval (const double l_, const double u_) | |
| Constructor for a variable that belongs to the interval [l,u]. More... | |
| Interval (const Interval &I) | |
| Copy constructor. More... | |
| BooleanType | isCompact () const |
| const double & | l () const |
| Returns the lower bounding value. More... | |
| void | l (const double lb) |
| Sets the lower bound. More... | |
| Interval & | operator*= (const double c) |
| Interval & | operator*= (const Interval &I) |
| Interval & | operator+= (const double c) |
| Interval & | operator+= (const Interval &I) |
| Interval & | operator-= (const double c) |
| Interval & | operator-= (const Interval &I) |
| Interval & | operator/= (const double c) |
| Interval & | operator/= (const Interval &I) |
| Interval & | operator= (const double c) |
| Interval & | operator= (const Interval &I) |
| void | print () const |
| const double & | u () const |
| Returns the upper bounding value. More... | |
| void | u (const double ub) |
| Sets the upper bound. More... | |
| ~Interval () | |
| Destructor. More... | |
Private Member Functions | |
| double | mid (const double convRel, const double concRel, const double valCut, int &indexMid) const |
| double | xlog (const double x) const |
Private Attributes | |
| double | _l |
| Lower bound. More... | |
| double | _u |
| Upper bound. More... | |
Friends | |
| double | abs (const Interval &) |
| Interval | acos (const Interval &) |
| Interval | arh (const Interval &, const double) |
| Interval | asin (const Interval &) |
| Interval | atan (const Interval &) |
| Interval | cos (const Interval &) |
| double | diam (const Interval &) |
| Interval | exp (const Interval &) |
| Interval | fabs (const Interval &) |
| Interval | hull (const Interval &, const Interval &) |
| bool | inter (Interval &, const Interval &, const Interval &) |
| Interval | inv (const Interval &) |
| Interval | log (const Interval &) |
| Interval | max (const Interval &, const Interval &) |
| Interval | max (const unsigned int, const Interval *) |
| double | mid (const Interval &) |
| double | mid (const double, const double, const double, int &) |
| Interval | min (const Interval &, const Interval &) |
| Interval | min (const unsigned int, const Interval *) |
| bool | operator!= (const Interval &, const Interval &) |
| Interval | operator* (const Interval &, const Interval &) |
| Interval | operator* (const Interval &, const double) |
| Interval | operator* (const double, const Interval &) |
| Interval | operator+ (const Interval &) |
| Interval | operator+ (const Interval &, const Interval &) |
| Interval | operator+ (const double, const Interval &) |
| Interval | operator+ (const Interval &, const double) |
| Interval | operator- (const Interval &) |
| Interval | operator- (const Interval &, const Interval &) |
| Interval | operator- (const double, const Interval &) |
| Interval | operator- (const Interval &, const double) |
| Interval | operator/ (const Interval &, const Interval &) |
| Interval | operator/ (const Interval &, const double) |
| Interval | operator/ (const double, const Interval &) |
| bool | operator< (const Interval &, const Interval &) |
| std::ostream & | operator<< (std::ostream &, const Interval &) |
| bool | operator<= (const Interval &, const Interval &) |
| bool | operator== (const Interval &, const Interval &) |
| bool | operator> (const Interval &, const Interval &) |
| bool | operator>= (const Interval &, const Interval &) |
| Interval | pow (const Interval &, const int) |
| Interval | pow (const Interval &, const double) |
| Interval | pow (const Interval &, const Interval &) |
| Interval | sin (const Interval &) |
| Interval | sqr (const Interval &) |
| Interval | sqrt (const Interval &) |
| Interval | tan (const Interval &) |
| Interval | xlog (const Interval &) |
Implements a rudimentary interval class.
Interval is a C++ class for calculating the natural interval
extension of a factorable function on a box.
Example Code:
Interval X(-1,1); // An interval X = [-1,1].
Interval Y( 1,2); // An interval Y = y[1,2].
Interval Z = X + X*Y; // An interval Z that contains
// the set { x + x*y | x in X, y in Y };
Z.print(); // display the result. Definition at line 67 of file interval.hpp.
|
inline |
Default constructor.
Definition at line 138 of file interval.hpp.
|
inline |
Constructor for a constant value c
Definition at line 141 of file interval.hpp.
|
inline |
Constructor for a variable that belongs to the interval [l,u].
Definition at line 144 of file interval.hpp.
|
inline |
Copy constructor.
Definition at line 147 of file interval.hpp.
|
inline |
Destructor.
Definition at line 150 of file interval.hpp.
| BEGIN_NAMESPACE_ACADO BooleanType Interval::isCompact | ( | ) | const |
Routine which returns BT_FALSE if the lower or upper bounds is equal to "nan" or "INFTY".
Otherwise, BT_TRUE is returned.
Definition at line 41 of file interval.cpp.
|
inline |
Returns the lower bounding value.
Definition at line 153 of file interval.hpp.
|
inline |
Sets the lower bound.
Definition at line 159 of file interval.hpp.
|
private |
Definition at line 55 of file interval.cpp.
|
inline |
Definition at line 131 of file interval.hpp.
Definition at line 133 of file interval.hpp.
|
inline |
Definition at line 127 of file interval.hpp.
Definition at line 128 of file interval.hpp.
|
inline |
Definition at line 129 of file interval.hpp.
Definition at line 130 of file interval.hpp.
|
inline |
Definition at line 134 of file interval.hpp.
Definition at line 135 of file interval.hpp.
|
inline |
Definition at line 125 of file interval.hpp.
Definition at line 126 of file interval.hpp.
|
inline |
Definition at line 165 of file interval.hpp.
|
inline |
Returns the upper bounding value.
Definition at line 156 of file interval.hpp.
|
inline |
Sets the upper bound.
Definition at line 162 of file interval.hpp.
|
inlineprivate |
Definition at line 175 of file interval.hpp.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
Lower bound.
Definition at line 178 of file interval.hpp.
|
private |
Upper bound.
Definition at line 180 of file interval.hpp.