|
ZonoOpt 2.2.0
|
#include <Interval.hpp>
Public Member Functions | |
| Interval () | |
| Default constructor. | |
| Interval (const zono_float y_min, const zono_float y_max) | |
| Interval constructor. | |
| Interval * | clone () const |
| Clone Interval object. | |
| zono_float | lower () const |
| Get lower bound. | |
| zono_float | upper () const |
| Get upper bound. | |
| Interval | operator+ (const Interval &other) const |
| Interval addition. | |
| void | operator+= (const Interval &other) |
| Interval addition in-place. | |
| Interval | operator+ (const zono_float alpha) const |
| Interval addition with scalar. | |
| void | operator+= (const zono_float alpha) |
| Interval addition with scalar in-place. | |
| Interval | operator- (const Interval &other) const |
| Interval subtraction. | |
| void | operator-= (const Interval &other) |
| Interval subtraction in-place. | |
| Interval | operator- (const zono_float alpha) const |
| Interval subtraction with scalar. | |
| void | operator-= (const zono_float alpha) |
| Interval subtraction with scalar in-place. | |
| Interval | operator* (const Interval &other) const |
| Interval multiplication. | |
| void | operator*= (const Interval &other) |
| Interval multiplication in-place. | |
| Interval | operator* (const zono_float alpha) const |
| Interval multiplication with scalar. | |
| void | operator*= (const zono_float alpha) |
| Interval multiplication with scalar in-place. | |
| Interval | operator/ (const Interval &other) const |
| Interval division. | |
| void | operator/= (const Interval &other) |
| Interval division in-place. | |
| Interval | operator/ (const zono_float alpha) const |
| Interval division with scalar. | |
| void | operator/= (const zono_float alpha) |
| Interval division with scalar in-place. | |
| Interval | operator- () const |
| Unary minus: returns -1 * this. | |
| Interval | operator& (const Interval &other) const |
| Interval intersection. | |
| Interval | operator| (const Interval &other) const |
| Interval hull. | |
| bool | operator<= (const Interval &other) const |
| Set containment operator. | |
| bool | operator>= (const Interval &other) const |
| Set containment operator. | |
| bool | operator== (const Interval &other) const |
| Set equality operator. | |
| Interval | inv () const |
| Interval inverse. | |
| Interval | intersect (const Interval &other) const |
| Interval intersection. | |
| Interval | interval_hull (const Interval &other) const |
| Interval hull. | |
| bool | contains (const zono_float x) const |
| Checks whether interval contains a value. | |
| bool | contains_set (const Interval &other) const |
| Set containment for intervals. | |
| bool | is_single_valued () const |
| Checks whether interval is single-valued (i.e., width is 0 within numerical tolerance) | |
| bool | is_empty () const |
| Checks whether interval is empty. | |
| zono_float | center () const |
| Get center of interval. | |
| zono_float | width () const |
| Get width of interval. | |
| Interval | radius () const |
| Get radius of interval. | |
| Interval | abs () const |
| Get absolute value of interval. | |
| Interval | sqrt () const |
| Get square root of interval. | |
| Interval | pow (const int n) const |
| Interval power. | |
| Interval | pow (const zono_float f) const |
| Interval power with fractional exponent. | |
| Interval | nth_root (const int n) const |
| Interval nth root. | |
| Interval | exp () const |
| Compute interval containing exp(x) for all x in interval. | |
| Interval | log () const |
| Compute interval containing log(x) (base e) for all x in interval. | |
| Interval | sin () const |
| Compute interval containing sin(x) for all x in interval. | |
| Interval | cos () const |
| Compute interval containing cos(x) for all x in interval. | |
| Interval | tan () const |
| Compute interval containing tan(x) for all x in interval. | |
| Interval | arcsin () const |
| Compute interval containing arcsin(x) for all x in interval. | |
| Interval | arccos () const |
| Compute interval containing arccos(x) for all x in interval. | |
| Interval | arctan () const |
| Compute interval containing arctan(x) for all x in interval. | |
| Interval | sinh () const |
| Compute interval containing sinh(x) for all x in interval. | |
| Interval | cosh () const |
| Compute interval containing cosh(x) for all x in interval. | |
| Interval | tanh () const |
| Compute interval containing tanh(x) for all x in interval. | |
| Interval | arcsinh () const |
| Compute interval containing arcsinh(x) for all x in interval. | |
| Interval | arccosh () const |
| Compute interval containing arccosh(x) for all x in interval. | |
| Interval | arctanh () const |
| Compute interval containing arctanh(x) for all x in interval. | |
| std::string | print () const |
| Print method for interval. | |
Friends | |
| Interval | operator+ (const zono_float alpha, const Interval &interval) |
| Interval addition with scalar. | |
| Interval | operator- (const zono_float alpha, const Interval &interval) |
| Interval subtraction with scalar. | |
| Interval | operator* (const zono_float alpha, const Interval &interval) |
| Interval multiplication with scalar. | |
| Interval | operator/ (const zono_float alpha, const Interval &interval) |
| Interval division with scalar. | |
| std::ostream & | operator<< (std::ostream &os, const Interval &interval) |
| Print to ostream. | |
Interval class.
Wraps boost::numeric::interval
|
inline |
Default constructor.
|
inline |
Interval constructor.
| y_min | lower bound |
| y_max | upper bound |
| Interval ZonoOpt::Interval::abs | ( | ) | const |
Get absolute value of interval.
| Interval ZonoOpt::Interval::arccos | ( | ) | const |
Compute interval containing arccos(x) for all x in interval.
| Interval ZonoOpt::Interval::arccosh | ( | ) | const |
Compute interval containing arccosh(x) for all x in interval.
| Interval ZonoOpt::Interval::arcsin | ( | ) | const |
Compute interval containing arcsin(x) for all x in interval.
| Interval ZonoOpt::Interval::arcsinh | ( | ) | const |
Compute interval containing arcsinh(x) for all x in interval.
| Interval ZonoOpt::Interval::arctan | ( | ) | const |
Compute interval containing arctan(x) for all x in interval.
| Interval ZonoOpt::Interval::arctanh | ( | ) | const |
Compute interval containing arctanh(x) for all x in interval.
| zono_float ZonoOpt::Interval::center | ( | ) | const |
Get center of interval.
| bool ZonoOpt::Interval::contains | ( | const zono_float | x | ) | const |
Checks whether interval contains a value.
| x | scalar value |
| bool ZonoOpt::Interval::contains_set | ( | const Interval & | other | ) | const |
Set containment for intervals.
| other | interval to check if is subset |
| Interval ZonoOpt::Interval::cos | ( | ) | const |
Compute interval containing cos(x) for all x in interval.
| Interval ZonoOpt::Interval::cosh | ( | ) | const |
Compute interval containing cosh(x) for all x in interval.
| Interval ZonoOpt::Interval::exp | ( | ) | const |
Compute interval containing exp(x) for all x in interval.
| bool ZonoOpt::Interval::is_empty | ( | ) | const |
Checks whether interval is empty.
| bool ZonoOpt::Interval::is_single_valued | ( | ) | const |
Checks whether interval is single-valued (i.e., width is 0 within numerical tolerance)
| Interval ZonoOpt::Interval::log | ( | ) | const |
Compute interval containing log(x) (base e) for all x in interval.
| zono_float ZonoOpt::Interval::lower | ( | ) | const |
Get lower bound.
| Interval ZonoOpt::Interval::nth_root | ( | const int | n | ) | const |
| Interval ZonoOpt::Interval::operator* | ( | const zono_float | alpha | ) | const |
| void ZonoOpt::Interval::operator*= | ( | const Interval & | other | ) |
Interval multiplication in-place.
| other | other interval |
| void ZonoOpt::Interval::operator*= | ( | const zono_float | alpha | ) |
Interval multiplication with scalar in-place.
| alpha | scalar |
| Interval ZonoOpt::Interval::operator+ | ( | const zono_float | alpha | ) | const |
| void ZonoOpt::Interval::operator+= | ( | const Interval & | other | ) |
Interval addition in-place.
| other | other interval |
| void ZonoOpt::Interval::operator+= | ( | const zono_float | alpha | ) |
Interval addition with scalar in-place.
| alpha | scalar |
| Interval ZonoOpt::Interval::operator- | ( | ) | const |
Unary minus: returns -1 * this.
| Interval ZonoOpt::Interval::operator- | ( | const zono_float | alpha | ) | const |
| void ZonoOpt::Interval::operator-= | ( | const Interval & | other | ) |
Interval subtraction in-place.
| other | other interval |
| void ZonoOpt::Interval::operator-= | ( | const zono_float | alpha | ) |
Interval subtraction with scalar in-place.
| alpha | scalar to subtract |
| Interval ZonoOpt::Interval::operator/ | ( | const zono_float | alpha | ) | const |
| void ZonoOpt::Interval::operator/= | ( | const Interval & | other | ) |
Interval division in-place.
| other | interval to divide |
| void ZonoOpt::Interval::operator/= | ( | const zono_float | alpha | ) |
Interval division with scalar in-place.
| alpha | scalar |
| bool ZonoOpt::Interval::operator<= | ( | const Interval & | other | ) | const |
Set containment operator.
| other |
| bool ZonoOpt::Interval::operator== | ( | const Interval & | other | ) | const |
Set equality operator.
| other |
| bool ZonoOpt::Interval::operator>= | ( | const Interval & | other | ) | const |
Set containment operator.
| other |
| Interval ZonoOpt::Interval::pow | ( | const int | n | ) | const |
| Interval ZonoOpt::Interval::pow | ( | const zono_float | f | ) | const |
Interval power with fractional exponent.
| f | power |
Calls integer power if f is an integer within numerical tolerance. Calls nth_root if f is a positive rational number within numerical tolerance. Otherwise throws error.
| std::string ZonoOpt::Interval::print | ( | ) | const |
Print method for interval.
| Interval ZonoOpt::Interval::radius | ( | ) | const |
Get radius of interval.
Returns interval centered at zero with width equal to the width of the original interval
| Interval ZonoOpt::Interval::sin | ( | ) | const |
Compute interval containing sin(x) for all x in interval.
| Interval ZonoOpt::Interval::sinh | ( | ) | const |
Compute interval containing sinh(x) for all x in interval.
| Interval ZonoOpt::Interval::sqrt | ( | ) | const |
Get square root of interval.
| Interval ZonoOpt::Interval::tan | ( | ) | const |
Compute interval containing tan(x) for all x in interval.
| Interval ZonoOpt::Interval::tanh | ( | ) | const |
Compute interval containing tanh(x) for all x in interval.
| zono_float ZonoOpt::Interval::upper | ( | ) | const |
Get upper bound.
| zono_float ZonoOpt::Interval::width | ( | ) | const |
Get width of interval.
|
friend |
Interval multiplication with scalar.
| alpha | scalar |
| interval | interval |
|
friend |
Interval addition with scalar.
| alpha | scalar |
| interval | interval |
|
friend |
Interval subtraction with scalar.
| alpha | scalar |
| interval | interval |
|
friend |
Interval division with scalar.
| alpha | scalar |
| interval | interval |
|
friend |
Print to ostream.
| os | |
| interval |