Drake

A linear interpolator for arbitrary inverse functions. More...
#include <automotive/maliput/rndf/spline_helpers.h>
Public Member Functions  
InverseFunctionInterpolator (std::function< double(double)> function, double xmin, double xmax, double error_boundary)  
Constructor that takes the function, its domain interval and an error boundary for the interpolation. More...  
double  InterpolateMthDerivative (int derivative_order, double y) 
Interpolates \( x^{(derivative_order)}(y) \), that is, the inverse of the given function. More...  
Does not allow copy, move, or assignment  
InverseFunctionInterpolator (const InverseFunctionInterpolator &)=delete  
InverseFunctionInterpolator &  operator= (const InverseFunctionInterpolator &)=delete 
InverseFunctionInterpolator (InverseFunctionInterpolator &&)=delete  
InverseFunctionInterpolator &  operator= (InverseFunctionInterpolator &&)=delete 
A linear interpolator for arbitrary inverse functions.
Helpful for pathlength parameterization with ignition::math::Splines. Given a function F, its domain D, and codomain CD, this class gives a linear interpolant of F's inverse that maps CD to D.

delete 

delete 

explicit 
Constructor that takes the function, its domain interval and an error boundary for the interpolation.
The valid range of function's
codomain is determined as follows. The minimum value is xmin
applied to function
. The maximum value is xmax
applied to function
. This is valid because function
is assumed to be monotonically increasing with x.
[in]  function  an arbitrary continuous function for which to interpolate an inverse. It should be monotonically increasing with x. 
[in]  xmin  function 's domain interval low bound. 
[in]  xmax  function 's domain interval upper bound. 
[in]  error_boundary  a positive constraint on the maximum error allowed when approximating the inverse function. 
std::runtime_error  When error_boundary is not positive. 
std::runtime_error  When xmin is equal or greater than xmax . 
std::runtime_error  When evaluating function throws. 
Interpolates \( x^{(derivative_order)}(y) \), that is, the inverse of the given function.
[in]  derivative_order  a nonnegative integer describing the order of the inverse function derivative to interpolate. Any value bigger than 1 will make the function return 0.0 as this is a linear interpolant. 
[in]  y  the range value to interpolate at, constrained by the direct function image, which is inside the codomain of the direct function. 
derivative_order
derivative \( x^{(derivative_order)}(y) \) . when  derivative_order is a negative integer. 
when  y is larger than the maximum range of the function's codomain as described in the constructor's documentation. 
std::runtime_error  When y is smaller than the minimum range of the function's codomain as described in the constructor's documentation. 

delete 

delete 