ImFusion SDK 4.3
Interval Class Reference

#include <RoboticsPlugin/Include/ImFusion/Robotics/MotionPlanning/Interval.h>

Represents an interval in the real line. More...

Detailed Description

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
 

Constructor & Destructor Documentation

◆ Interval() [1/2]

Interval ( double point,
double length )

Constructor with initial time and lenght of the interval.

Parameters
pointPoint on the real line corresponding the to left limit (right if
lengthis negative)
lengthlength of the interval

◆ Interval() [2/2]

Interval ( const std::pair< double, double > & p)

Constructor with a pair that facilitates copy as {t_0, t_1}.

Parameters
lengthlength of the interval

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close