45 std::pair<double, double> p1, p2, p3, p4;
47 auto it_ge1 = m_x2y.lower_bound(x);
50 if (it_ge1 != m_x2y.end() && it_ge1->first == x)
58 if (it_ge1 == m_x2y.end() || it_ge1 == m_x2y.begin())
65 if (it_ge1 == m_x2y.end())
75 if (it_ge1 == m_x2y.begin())
105 out << m_x2y << m_wrap2pi;
115 in >> m_x2y >> m_wrap2pi;
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
void appendXY(double x, double y)
Append a new point:
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
A (persistent) sequence of (x,y) coordinates, allowing queries of intermediate points through spline ...
This base provides a set of functions for maths stuff.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::vision::TStereoCalibResults out
NUMTYPE 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 tw...
double & query(double x, double &y, bool &out_valid) const
Query an interpolation of the curve at some "x".