Spline Class ReferenceΒΆ
| 
    Splines
    
   | 
 
#include <Splines.hh>
  
Public Member Functions | |
| void | search (std::pair< integer, real_type > &res) const | 
Constructors  | |
| Spline (string const &name="Spline") | |
| virtual | ~Spline () | 
Open/Close  | |
| string const & | name () const | 
| bool | is_closed () const | 
| void | make_closed () | 
| void | make_opened () | 
| bool | is_bounded () const | 
| void | make_unbounded () | 
| void | make_bounded () | 
| bool | is_extended_constant () const | 
| void | make_extended_constant () | 
| void | make_extended_not_constant () | 
Spline Data Info  | |
| integer | num_points () const | 
| real_type | x_node (integer i) const | 
| real_type | y_node (integer i) const | 
| real_type | x_begin () const | 
| real_type | y_begin () const | 
| real_type | x_end () const | 
| real_type | y_end () const | 
| real_type | x_min () const | 
| real_type | x_max () const | 
| real_type | y_min () const | 
| real_type | y_max () const | 
| virtual void | y_min_max (integer &i_min_pos, real_type &x_min_pos, real_type &y_min, integer &i_max_pos, real_type &x_max_pos, real_type &y_max) const | 
| virtual void | y_min_max (vector< integer > &i_min_pos, vector< real_type > &x_min_pos, vector< real_type > &y_min, vector< integer > &i_max_pos, vector< real_type > &x_max_pos, vector< real_type > &y_max) const | 
Build  | |
| void | build (GenericContainer const &gc) | 
| virtual void | build (real_type const x[], integer incx, real_type const y[], integer incy, integer n) | 
| void | build (real_type const x[], real_type const y[], integer n) | 
| void | build (vector< real_type > const &x, vector< real_type > const &y) | 
| virtual void | build ()=0 | 
| virtual void | setup (GenericContainer const &gc) | 
Incremental Build  | |
| virtual void | reserve (integer npts)=0 | 
| void | push_back (real_type x, real_type y) | 
| void | drop_back () | 
| virtual void | clear ()=0 | 
Manipulate  | |
| void | set_origin (real_type x0) | 
| void | set_range (real_type xmin, real_type xmax) | 
Dump Data  | |
| void | dump (ostream_type &s, integer nintervals, char const header[]="x\ty") const | 
| void | dump (char const fname[], integer nintervals, char const header[]="x\ty") const | 
| virtual void | write_to_stream (ostream_type &s) const =0 | 
Evaluation  | |
| virtual real_type | eval (real_type x) const =0 | 
| virtual real_type | D (real_type x) const =0 | 
| virtual real_type | DD (real_type x) const =0 | 
| virtual real_type | DDD (real_type x) const =0 | 
| virtual real_type | DDDD (real_type) const | 
| virtual real_type | DDDDD (real_type) const | 
Evaluation Aliases  | |
| real_type | operator() (real_type x) const | 
| real_type | eval_D (real_type x) const | 
| real_type | eval_DD (real_type x) const | 
| real_type | eval_DDD (real_type x) const | 
| real_type | eval_DDDD (real_type x) const | 
| real_type | eval_DDDDD (real_type x) const | 
Evaluation when segment is known  | |
| virtual real_type | id_eval (integer ni, real_type x) const =0 | 
| virtual real_type | id_D (integer ni, real_type x) const =0 | 
| virtual real_type | id_DD (integer ni, real_type x) const =0 | 
| virtual real_type | id_DDD (integer ni, real_type x) const =0 | 
| virtual real_type | id_DDDD (integer, real_type) const | 
| virtual real_type | id_DDDDD (integer, real_type) const | 
Get Info  | |
| virtual integer | coeffs (real_type cfs[], real_type nodes[], bool transpose=false) const =0 | 
| virtual integer | order () const =0 | 
| char const * | type_name () const | 
| virtual SplineType1D | type () const =0 | 
| string | info () const | 
| void | info (ostream_type &stream) const | 
Friends | |
| class | SplineSet | 
Detailed Description
Spline Management Class
Constructor & Destructor Documentation
◆ Spline()
      
  | 
  inline | 
spline constructor
◆ ~Spline()
      
  | 
  inlinevirtual | 
spline destructor
Member Function Documentation
◆ build() [1/5]
      
  | 
  pure virtual | 
Build a spline using internal stored data
Implemented in Splines::AkimaSpline, Splines::BesselSpline, Splines::ConstantSpline, Splines::CubicSpline, Splines::HermiteSpline, Splines::LinearSpline, Splines::PchipSpline, and Splines::QuinticSpline.
◆ build() [2/5]
      
  | 
  inline | 
Build a spline using data in GenericContainer 
◆ build() [3/5]
      
  | 
  virtual | 
Build a spline.
- Parameters
 - 
  
x vector of x-coordinates incx access elements as x[0],x[incx],x[2*incx],...y vector of y-coordinates incy access elements as y[0],y[incx],y[2*incx],...n total number of points  
Reimplemented in Splines::ConstantSpline, and Splines::HermiteSpline.
◆ build() [4/5]
Build a spline.
- Parameters
 - 
  
x vector of x-coordinates y vector of y-coordinates n total number of points  
◆ build() [5/5]
Build a spline.
- Parameters
 - 
  
x vector of x-coordinates y vector of y-coordinates  
◆ clear()
      
  | 
  pure virtual | 
Delete the support points, empty the spline.
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ coeffs()
      
  | 
  pure virtual | 
get the piecewise polinomials of the spline
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ D()
First derivative
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ DD()
Second derivative
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ DDD()
Third derivative
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ DDDD()
4th derivative
Reimplemented in Splines::CubicSplineBase, and Splines::QuinticSplineBase.
◆ DDDDD()
5th derivative
Reimplemented in Splines::CubicSplineBase, and Splines::QuinticSplineBase.
◆ drop_back()
      
  | 
  inline | 
Drop last inserted point of the spline.
◆ dump() [1/2]
      
  | 
  inline | 
dump a sample of the spline
◆ dump() [2/2]
| void Splines::Spline::dump | ( | ostream_type & | s, | 
| integer | nintervals, | ||
| char const | header[] = "x\ty" ) const | 
dump a sample of the spline
◆ eval()
Evaluate spline value
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ eval_D()
◆ eval_DD()
Alias for real_type DD( real_type x ) 
◆ eval_DDD()
Alias for real_type DDD( real_type x ) 
◆ eval_DDDD()
Alias for real_type DDDD( real_type x ) 
◆ eval_DDDDD()
Alias for real_type DDDD( real_type x ) 
◆ id_D()
First derivative
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ id_DD()
Second derivative
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ id_DDD()
Third derivative
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ id_DDDD()
4th derivative
Reimplemented in Splines::CubicSplineBase, and Splines::QuinticSplineBase.
◆ id_DDDDD()
5th derivative
Reimplemented in Splines::CubicSplineBase, and Splines::QuinticSplineBase.
◆ id_eval()
Evaluate spline value
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ info() [1/2]
| string Splines::Spline::info | ( | ) | const | 
String information of the kind and order of the spline
◆ info() [2/2]
      
  | 
  inline | 
Print information of the kind and order of the spline
◆ is_bounded()
      
  | 
  inline | 
- Returns
 trueif spline cannot extend outside interval of definition
◆ is_closed()
      
  | 
  inline | 
- Returns
 trueif spline is a closed spline
◆ is_extended_constant()
      
  | 
  inline | 
- Returns
 trueif the spline extend with a constant value
◆ make_bounded()
      
  | 
  inline | 
Set spline as bounded. When evaluated if parameter is outside the domain an error is issued.
◆ make_closed()
      
  | 
  inline | 
Set spline as a closed spline. When evaluated if parameter is outside the domain is wrapped cyclically before evalation.
◆ make_extended_constant()
      
  | 
  inline | 
Set spline to extend constant. When evaluated if parameter is outside the domain the value returned is the value of the closed border.
◆ make_extended_not_constant()
      
  | 
  inline | 
Set spline to extend NOT constant. When evaluated if parameter is outside the domain teh value returned is extrapolated using the last spline polynomial.
◆ make_opened()
      
  | 
  inline | 
Set spline as an opened spline. When evaluated if parameter is outside the domain an error is produced.
◆ make_unbounded()
      
  | 
  inline | 
Set spline as unbounded. When evaluated if parameter is outside the domain an extrapolated value is used.
◆ name()
      
  | 
  inline | 
- Returns
 - string with the name of the spline
 
◆ num_points()
      
  | 
  inline | 
the number of support points of the spline.
◆ operator()()
Alias for real_type eval( real_type x ) 
◆ order()
      
  | 
  pure virtual | 
Spline order of the piecewise polynomial
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ push_back()
Add a support point (x,y) to the spline.
◆ reserve()
      
  | 
  pure virtual | 
Allocate memory for npts points 
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ search()
Find interval containing x using binary search. 
◆ set_origin()
| void Splines::Spline::set_origin | ( | real_type | x0 | ) | 
change X-origin of the spline
◆ set_range()
◆ setup()
      
  | 
  virtual | 
Setup a spline using a GenericContainer
- gc("xdata") vector with the 
xcoordinate of the data - gc("ydata") vector with the 
ycoordinate of the data 
Reimplemented in Splines::AkimaSpline, Splines::BesselSpline, Splines::ConstantSpline, Splines::CubicSpline, Splines::HermiteSpline, Splines::LinearSpline, Splines::PchipSpline, and Splines::QuinticSpline.
◆ type()
      
  | 
  pure virtual | 
spline type returned as integer
Implemented in Splines::AkimaSpline, Splines::BesselSpline, Splines::ConstantSpline, Splines::CubicSpline, Splines::HermiteSpline, Splines::LinearSpline, Splines::PchipSpline, and Splines::QuinticSplineBase.
◆ type_name()
      
  | 
  inline | 
spline type returned as a string
◆ write_to_stream()
      
  | 
  pure virtual | 
Print spline coefficients
Implemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ x_begin()
      
  | 
  inline | 
first node of the spline (x component).
◆ x_end()
      
  | 
  inline | 
last node of the spline (x component).
◆ x_max()
      
  | 
  inline | 
x-maximum spline value
◆ x_min()
      
  | 
  inline | 
x-minumum spline value
◆ x_node()
the i-th node of the spline (x component).
◆ y_begin()
      
  | 
  inline | 
first node of the spline (y component).
◆ y_end()
      
  | 
  inline | 
last node of the spline (y component).
◆ y_max()
      
  | 
  inline | 
return y-maximum spline value
◆ y_min()
      
  | 
  inline | 
y-minumum spline value
◆ y_min_max() [1/2]
      
  | 
  virtual | 
Search the max and min values of y along the spline with the corresponding x position
- Parameters
 - 
  
[out] i_min_pos interval where is the minimum [out] x_min_pos where is the minimum [out] y_min the minimum value [out] i_max_pos interval where is the maximum [out] x_max_pos where is the maximum [out] y_max the maximum value  
Reimplemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ y_min_max() [2/2]
      
  | 
  virtual | 
Search the max and min values of y along the spline with the corresponding x position
- Parameters
 - 
  
[out] i_min_pos interval where is the minimum [out] x_min_pos where is the minimum [out] y_min the minimum value [out] i_max_pos interval where is the maximum [out] x_max_pos where is the maximum [out] y_max the maximum value  
Reimplemented in Splines::ConstantSpline, Splines::CubicSplineBase, Splines::LinearSpline, and Splines::QuinticSplineBase.
◆ y_node()
the i-th node of the spline (y component).
The documentation for this class was generated from the following files:
- /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Splines/src/Splines.hh
 - /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Splines/src/Splines.cc
 
Generated by