One-dimensional closed interval class. More...
#include <interval.h>
Public Member Functions | |
| Interval () | |
| Default constructor. | |
| Interval (const Scalar &s) | |
| Constructor for single point interval (degenerate case [s, s]). | |
| Interval (const Scalar &bound1, const Scalar &bound2) | |
| Constructor for lower and upper bounds input (order is irrelevant). | |
| bool | operator== (const Interval &in) const |
| bool | operator!= (const Interval &in) const |
| Scalar | center () const |
| Interval center. | |
| Scalar | width () const |
| Interval width. | |
| Interval & | widen (const Scalar &s) |
| Widen interval by 2 s (s at each endpoint). | |
| Scalar | getLowerBound () const |
| Gets interval lower bound. | |
| Scalar & | getLowerBoundRef () |
| const Scalar & | getLowerBoundRef () const |
| Scalar | getUpperBound () const |
| Gets interval upper bound. | |
| Scalar & | getUpperBoundRef () |
| const Scalar & | getUpperBoundRef () const |
| void | setValue (const Scalar &s) |
| Sets interval. | |
| void | setValue (const Scalar &lb, const Scalar &ub) |
| Sets interval. | |
One-dimensional closed interval class.
This is an example of how to use the Interval class:
1.8.1.2