34 #include <unordered_map>
36 #include "Eigen/Dense"
247 return (n == 0) ? 1 : n *
factorial (n - 1);
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
CepsReal d4Polynomial(CepsReal x)
A polynomial satisfying 0-derivative equalities.
constexpr CepsUInt factorial(CepsUInt n)
Compile-time factorial.
CepsReal newtonSolvePol4Pts(CepsReal f0, CepsReal f1, CepsReal f2, CepsReal f3, CepsReal c, CepsReal t0)
Solves for , based on a 4 points interpolation of , using Newton method.
CepsReal polRef(CepsReal r)
Pole function used in stimulation function definition.
CepsReal d5Polynomial(CepsReal r)
Another polynomial satisfying more 0-derivative equalities.
CepsReal cInfinityStim(CepsReal t, CepsReal duration, CepsReal *point, const CepsVector< CepsReal > &orig, CepsReal diam, CepsReal amp)
Regular stimulation function.
CepsReal derivativeLagrangianPol4Pts(CepsReal x, CepsReal f0, CepsReal f1, CepsReal f2, CepsReal f3)
Derivative of Lagrange interpolating polynomial of degree 3.
CepsReal constStim(CepsReal t, CepsReal duration, CepsReal *point, const CepsVector< CepsReal > &orig, CepsReal diam, CepsReal amp)
Constant stimulation in a region (step function in time)
CepsReal c5Stim(CepsReal t, CepsReal duration, CepsReal *point, const CepsVector< CepsReal > &orig, CepsReal diam, CepsReal amp)
Regular stimulation function.
CepsReal lagrangianPol4Pts(CepsReal x, CepsReal f0, CepsReal f1, CepsReal f2, CepsReal f3)
Lagrange interpolation of degree 3.
CepsReal c4Stim(CepsReal t, CepsReal duration, CepsReal *point, const CepsVector< CepsReal > &orig, CepsReal diam, CepsReal amp)
Regular stimulation function.
A namespace for all utility methods.