38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 Utils::Malloc<real_type> m_mem;
43 Utils::Malloc<real_type*> m_mem_p;
47 bool m_curve_is_closed{
false};
48 bool m_curve_can_extend{
true};
54 #ifdef SPLINES_USE_THREADS
55 mutable std::mutex m_last_interval_mutex;
56 mutable std::map<std::thread::id,std::shared_ptr<integer>> m_last_interval;
58 mutable integer m_last_interval;
61 void init_last_interval();
63 void compute_chords();
95 void search( std::pair<integer,real_type> & res )
const;
100 string const &
name()
const {
return m_name; }
179 {
return m_Y[size_t(j)][size_t(npt)]; }
209 {
return this->
eval( x, i ); }
222 {
return this->
D(x,i); }
235 {
return this->
DD(x,i); }
248 {
return this->
DDD(x,i); }
261 {
return this->
DDDD(x,i); }
274 {
return this->
DDDDD(x,i); }
402 {
eval( x, vals.set_vec_real(m_dim) ); }
409 {
eval_D( x, vals.set_vec_real(m_dim) ); }
416 {
eval_DD( x, vals.set_vec_real(m_dim) ); }
423 {
eval_DDD( x, vals.set_vec_real(m_dim) ); }
430 {
eval_DDDD( x, vals.set_vec_real(m_dim) ); }
437 {
eval_DDDDD( x, vals.set_vec_real(m_dim) ); }
450 eval( vec_real_type
const & x, GenericContainer & vals )
const;
457 eval_D( vec_real_type
const & x, GenericContainer & vals )
const;
464 eval_DD( vec_real_type
const & x, GenericContainer & vals )
const;
471 eval_DDD( vec_real_type
const & x, GenericContainer & vals )
const;
478 eval_DDDD( vec_real_type
const & x, GenericContainer & vals )
const;
485 eval_DDDDD( vec_real_type
const & x, GenericContainer & vals )
const;
554 build( GenericContainer
const & gc )
560 void setup( GenericContainer
const & gc );
588 info( ostream_type & stream )
const
589 { stream << this->
info() <<
'\n'; }
597 #ifdef SPLINES_BACK_COMPATIBILITY
598 integer numPoints()
const {
return m_npts; }
599 real_type const * xNodes()
const {
return m_X; }
603 real_type xMin()
const {
return m_X[0]; }
604 real_type xMax()
const {
return m_X[size_t(m_npts-1)]; }
Definition SplineVec.hxx:34
void catmull_rom()
Definition SplineVec.cc:276
real_type x_min() const
Definition SplineVec.hxx:184
real_type DD(real_type x, integer i) const
Definition SplineVec.cc:344
virtual ~SplineVec()
spline destructor
Definition SplineVec.cc:54
real_type x_max() const
Definition SplineVec.hxx:189
void eval_DDD(real_type x, GenericContainer &vals) const
Definition SplineVec.hxx:422
void eval_DDDD(real_type x, vector< real_type > &vals) const
void make_unbounded()
Definition SplineVec.hxx:134
real_type DDD(real_type x, integer i) const
Definition SplineVec.cc:359
void make_closed()
Definition SplineVec.hxx:115
real_type x_node(integer npt) const
Definition SplineVec.hxx:167
integer num_points() const
Definition SplineVec.hxx:152
void eval_DDDD(real_type x, GenericContainer &vals) const
Definition SplineVec.hxx:429
void eval_DDDD(vec_real_type const &x, GenericContainer &vals) const
real_type const * x_nodes() const
Definition SplineVec.hxx:162
void set_knots(real_type const X[])
Definition SplineVec.cc:202
bool can_extend() const
Definition SplineVec.hxx:127
void set_knots_centripetal()
Definition SplineVec.cc:262
real_type eval(real_type x, integer i) const
Definition SplineVec.cc:314
void eval_DDDDD(real_type x, vector< real_type > &vals) const
void eval_DDDDD(real_type x, real_type vals[], integer inc) const
real_type eval_D(real_type x, integer i) const
Definition SplineVec.hxx:221
void eval_DDDDD(real_type x, GenericContainer &vals) const
Definition SplineVec.hxx:436
void info(ostream_type &stream) const
Definition SplineVec.hxx:588
real_type operator()(real_type x, integer i) const
Definition SplineVec.hxx:208
string info() const
Definition SplineVec.cc:111
real_type const * y_nodes(integer j) const
Definition SplineVec.hxx:172
real_type curvature(real_type x) const
Definition SplineVec.cc:490
void eval_D(real_type x, GenericContainer &vals) const
Definition SplineVec.hxx:408
real_type DDDD(real_type x, integer i) const
void set_knots_chord_length()
Definition SplineVec.cc:246
void make_open()
Definition SplineVec.hxx:122
string const & name() const
Definition SplineVec.hxx:100
integer dimension() const
Definition SplineVec.hxx:157
void eval_DDDD(real_type x, real_type vals[], integer inc) const
real_type DDDDD(real_type x, integer i) const
real_type D(real_type x, integer i) const
Definition SplineVec.cc:329
void search(std::pair< integer, real_type > &res) const
Definition SplineVec.cc:62
void make_buonded()
Definition SplineVec.hxx:141
void build(GenericContainer const &gc)
Definition SplineVec.hxx:554
SplineType1D type() const
Definition SplineVec.hxx:577
bool is_closed() const
Definition SplineVec.hxx:108
real_type eval_DD(real_type x, integer i) const
Definition SplineVec.hxx:234
void eval_DD(real_type x, GenericContainer &vals) const
Definition SplineVec.hxx:415
real_type eval_DDD(real_type x, integer i) const
Definition SplineVec.hxx:247
void dump_table(ostream_type &s, integer num_points) const
Definition SplineVec.cc:118
real_type eval_DDDD(real_type x, integer i) const
Definition SplineVec.hxx:260
real_type curvature_D(real_type x) const
Definition SplineVec.cc:508
real_type eval_DDDDD(real_type x, integer i) const
Definition SplineVec.hxx:273
void eval(real_type x, GenericContainer &vals) const
Definition SplineVec.hxx:401
real_type y_node(integer npt, integer j) const
Definition SplineVec.hxx:178
void eval_DDDDD(vec_real_type const &x, GenericContainer &vals) const
void setup(integer dim, integer npts, real_type const *Y[])
Definition SplineVec.cc:174
Definition SplineAkima.cc:50
int integer
Signed integer type for splines.
Definition Splines.hh:58
enum class SplineType1D :integer { CONSTANT=0, LINEAR=1, CUBIC=2, AKIMA=3, BESSEL=4, PCHIP=5, QUINTIC=6, HERMITE=7, SPLINE_SET=8, SPLINE_VEC=9 } SplineType1D
Associate a number for each type of splines implemented.
Definition Splines.hh:71
double real_type
Floating point type for splines.
Definition Splines.hh:57