hermite  0.0.1
base_interpol.hpp
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include <cstddef>
10 
12 
13 namespace hermite {
14 using svector::Vector;
15 
23 template <std::size_t D> class BaseInterpol {
24 public:
28  virtual ~BaseInterpol() = default;
29 
39  virtual Vector<D> operator()(const double t) const { return getPos(t); }
40 
50  virtual Vector<D> getPos(const double t) const = 0;
51 
61  virtual Vector<D> getVel(const double t) const = 0;
62 
72  virtual Vector<D> getAcc(const double t) const = 0;
73 };
74 } // namespace hermite
Base class for interpolation functions.
Definition: base_interpol.hpp:23
virtual Vector< D > operator()(const double t) const
Gets value of the interpolation function at a certain point.
Definition: base_interpol.hpp:39
virtual Vector< D > getAcc(const double t) const =0
Gets second derivative of the function at a certain point.
virtual Vector< D > getPos(const double t) const =0
Gets value of the interpolation function at a certain point.
virtual Vector< D > getVel(const double t) const =0
Gets derivative of the function at a certain point.
virtual ~BaseInterpol()=default
Destructor.
A base vector representation.
Definition: simplevectors.hpp:63