![]() |
Classes | |
class | mrpt::math::CSplineInterpolator1D |
A (persistent) sequence of (x,y) coordinates, allowing queries of intermediate points through spline interpolation, where possible. More... | |
class | mrpt::poses::CPose2DInterpolator |
This class stores a time-stamped trajectory in SE(2) (mrpt::math::TPose2D poses). More... | |
class | mrpt::poses::CPose3DInterpolator |
This class stores a time-stamped trajectory in SE(3) (CPose3D poses). More... | |
class | mrpt::poses::CPoseInterpolatorBase< DIM > |
Base class for SE(2)/SE(3) interpolators. More... | |
Functions | |
template<class T , class VECTOR > | |
T | mrpt::math::interpolate (const T &x, const VECTOR &ys, const T &x0, const T &x1) |
Interpolate a data sequence "ys" ranging from "x0" to "x1" (equally spaced), to obtain the approximation of the sequence at the point "x". More... | |
double | mrpt::math::interpolate2points (const double x, const double x0, const double y0, const double x1, const double y1, bool wrap2pi=false) |
Linear interpolation/extrapolation: evaluates at "x" the line (x0,y0)-(x1,y1). More... | |
template<typename NUMTYPE , class VECTORLIKE > | |
NUMTYPE | mrpt::math::spline (const NUMTYPE t, const VECTORLIKE &x, const VECTORLIKE &y, bool wrap2pi=false) |
Interpolates the value of a function in a point "t" given 4 SORTED points where "t" is between the two middle points If wrap2pi is true, output "y" values are wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range). More... | |
template<typename NUMTYPE , class VECTORLIKE , int NUM_POINTS = Eigen::Dynamic> | |
NUMTYPE | mrpt::math::leastSquareLinearFit (const NUMTYPE t, const VECTORLIKE &x, const VECTORLIKE &y, bool wrap2pi=false) |
Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a single point "t". More... | |
template<class VECTORLIKE1 , class VECTORLIKE2 , class VECTORLIKE3 , int NUM_POINTS = Eigen::Dynamic> | |
void | mrpt::math::leastSquareLinearFit (const VECTORLIKE1 &ts, VECTORLIKE2 &outs, const VECTORLIKE3 &x, const VECTORLIKE3 &y, bool wrap2pi=false) |
Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a sequence of points "ts" and returned at "outs". More... | |
T mrpt::math::interpolate | ( | const T & | x, |
const VECTOR & | ys, | ||
const T & | x0, | ||
const T & | x1 | ||
) |
Interpolate a data sequence "ys" ranging from "x0" to "x1" (equally spaced), to obtain the approximation of the sequence at the point "x".
If the point "x" is out of the range [x0,x1], the closest extreme "ys" value is returned.
#include <mrpt/math/interp_fit.hpp>
Definition at line 17 of file interp_fit.hpp.
References ASSERT_, MRPT_END, and MRPT_START.
Referenced by mrpt::utils::hot2rgb(), mrpt::poses::CPoseInterpolatorBase< 3 >::interpolate(), mrpt::utils::jet2rgb(), and mrpt::poses::CPoseInterpolatorBase< 3 >::saveInterpolatedToTextFile().
double mrpt::mrpt::math::interpolate2points | ( | const double | x, |
const double | x0, | ||
const double | y0, | ||
const double | x1, | ||
const double | y1, | ||
bool | wrap2pi = false |
||
) |
Linear interpolation/extrapolation: evaluates at "x" the line (x0,y0)-(x1,y1).
If wrap2pi is true, output is wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range).
Definition at line 1975 of file math.cpp.
References MRPT_END, MRPT_START, THROW_EXCEPTION_FMT, and mrpt::math::wrapToPi().
Referenced by mrpt::poses::CPoseInterpolatorBase< 3 >::impl_interpolation().
NUMTYPE mrpt::math::leastSquareLinearFit | ( | const NUMTYPE | t, |
const VECTORLIKE & | x, | ||
const VECTORLIKE & | y, | ||
bool | wrap2pi = false |
||
) |
Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a single point "t".
The vectors x and y must have size >=2, and all values of "x" must be different. If wrap2pi is true, output "y" values are wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range).
#include <mrpt/math/interp_fit.hpp>
Definition at line 114 of file interp_fit.hpp.
References ASSERT_, inv(), MRPT_END, MRPT_START, and mrpt::math::wrapToPi().
void mrpt::math::leastSquareLinearFit | ( | const VECTORLIKE1 & | ts, |
VECTORLIKE2 & | outs, | ||
const VECTORLIKE3 & | x, | ||
const VECTORLIKE3 & | y, | ||
bool | wrap2pi = false |
||
) |
Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a sequence of points "ts" and returned at "outs".
If wrap2pi is true, output "y" values are wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range).
#include <mrpt/math/interp_fit.hpp>
Definition at line 148 of file interp_fit.hpp.
References ASSERT_, inv(), MRPT_END, MRPT_START, and mrpt::math::wrapToPi().
NUMTYPE mrpt::math::spline | ( | const NUMTYPE | t, |
const VECTORLIKE & | x, | ||
const VECTORLIKE & | y, | ||
bool | wrap2pi = false |
||
) |
Interpolates the value of a function in a point "t" given 4 SORTED points where "t" is between the two middle points If wrap2pi is true, output "y" values are wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range).
#include <mrpt/math/interp_fit.hpp>
Definition at line 37 of file interp_fit.hpp.
References ASSERT_, mrpt::obs::gnss::b1, mrpt::obs::gnss::b2, M_2PI, M_PI, mrpt::math::wrapToPi(), z1, z2, and z3.
Referenced by mrpt::poses::CPoseInterpolatorBase< 3 >::impl_interpolation(), and mrpt::math::CSplineInterpolator1D::query().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |