![]() |
ImFusion SDK 4.3
|
#include <RoboticsPlugin/Include/ImFusion/Robotics/MotionPlanning/Interval.h>
Represents an interval in the real line. More...
Represents an interval in the real line.
This is like R^2 but with the following constraint: for I=[t_1, t_2], this class constructor guaranties t_1 < t_2
Public Member Functions | |
| Interval (double point, double length) | |
| Constructor with initial time and lenght of the interval. | |
| Interval (const std::pair< double, double > &p) | |
| Constructor with a pair that facilitates copy as {t_0, t_1}. | |
| double | leftLimit () const |
| Get the left limit of the interval, i.e. initial time. | |
| double | rightLimit () const |
| Get the right limit of the interval, i.e. final time. | |
| double | randomPoint () const |
| Get a random numpber inside the interval limit of the interval. | |
| double | length () const |
| get the length of the interval, i.g. final time minus initial time | |
| bool | isApprox (const Interval &other, double tol=1.0e-9) const |
| Compare with another interval. | |
| void | scaleToInPlace (double point, double length) |
| Scale to another interval. | |
| void | scaleToInPlace (const Interval &) |
| Scale to another interval. | |
| bool | contains (double t) const |
| Checks if t in in the interval. | |
| std::vector< double > | linSpaceN (std::size_t n) const |
| returns a vector of points in the interval, with a given number of points | |
| std::vector< double > | linSpaceStep (double dt) const |
| returns a vector of points in the interval, with a given step | |
| Interval | ( | double | point, |
| double | length ) |
Constructor with initial time and lenght of the interval.
| point | Point on the real line corresponding the to left limit (right if |
| length | is negative) |
| length | length of the interval |
Constructor with a pair that facilitates copy as {t_0, t_1}.
| length | length of the interval |