Spline1D Class ReferenceΒΆ
Splines
|
Spline Management Class. More...
#include <Splines1D.hxx>
Public Member Functions | |
Spline1D (Spline1D const &)=delete | |
Spline1D const & | operator= (Spline1D const &)=delete |
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 |
void | reserve (integer npts) |
void | push_back (real_type x, real_type y) |
void | drop_back () |
void | build () |
void | setup (GenericContainer const &gc) |
void | build (GenericContainer const &gc) |
void | build (SplineType1D tp, real_type const x[], integer incx, real_type const y[], integer incy, integer n) |
void | build (SplineType1D tp, real_type const x[], real_type const y[], integer n) |
void | build (SplineType1D tp, vector< real_type > const &x, vector< real_type > const &y) |
void | clear () |
real_type | x_min () const |
real_type | x_max () const |
real_type | y_min () const |
real_type | y_max () const |
void | set_origin (real_type x0) |
void | set_range (real_type xmin, real_type xmax) |
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 |
integer | coeffs (real_type cfs[], real_type nodes[], bool transpose=false) const |
integer | order () const |
void | write_to_stream (ostream_type &s) const |
char const * | type_name () const |
SplineType1D | type () const |
string | info () const |
void | info (ostream_type &stream) const |
Constructors | |
Spline1D (std::string const &n) | |
~Spline1D () | |
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 () |
Evaluation | |
real_type | eval (real_type x) const |
real_type | D (real_type x) const |
real_type | DD (real_type x) const |
real_type | DDD (real_type x) const |
real_type | DDDD (real_type x) const |
real_type | DDDDD (real_type x) const |
Evaluation Aliases | |
real_type | operator() (real_type x) const |
real_type | eval_D (real_type x) const |
the value of the first derivative of the spline at x | |
real_type | eval_DD (real_type x) const |
the value of the second derivative of the spline at x | |
real_type | eval_DDD (real_type x) const |
the value of the third derivative of the spline at x | |
real_type | eval_DDDD (real_type x) const |
the value of the 4-th derivative of the spline at x | |
real_type | eval_DDDDD (real_type x) const |
the value of the 5-th derivative of the spline at x | |
Evaluation when segment is known | |
real_type | id_eval (integer ni, real_type x) const |
real_type | id_D (integer ni, real_type x) const |
real_type | id_DD (integer ni, real_type x) const |
real_type | id_DDD (integer ni, real_type x) const |
real_type | id_DDDD (integer ni, real_type x) const |
real_type | id_DDDDD (integer ni, real_type x) const |
Detailed Description
Spline Management Class.
Constructor & Destructor Documentation
◆ Spline1D()
|
inline |
Build an empty spline of Spline1D
type
- Parameters
-
n the name of the spline
◆ ~Spline1D()
|
inline |
Spline destructor.
Member Function Documentation
◆ build() [1/5]
|
inline |
Build a spline.
◆ build() [2/5]
|
inline |
Build a spline using data in GenericContainer
◆ build() [3/5]
void Splines::Spline1D::build | ( | SplineType1D | tp, |
real_type const | x[], | ||
integer | incx, | ||
real_type const | y[], | ||
integer | incy, | ||
integer | n ) |
Build a spline.
- Parameters
-
tp spline type x vector of x
-coordinatesincx access elements as x[0]
,x[incx]
,x[2*incx]
,...y vector of y
-coordinatesincy access elements as y[0]
,y[incy]
,x[2*incy]
,...n total number of points
◆ build() [4/5]
|
inline |
Build a spline.
- Parameters
-
tp spline type x vector of x-coordinates y vector of y-coordinates n total number of points
◆ build() [5/5]
|
inline |
Build a spline.
- Parameters
-
tp spline type x vector of x-coordinates y vector of y-coordinates
◆ clear()
|
inline |
Cancel the support points, empty the spline.
◆ coeffs()
|
inline |
Get the piecewise polinomials of the spline
◆ D()
◆ DD()
◆ DDD()
◆ DDDD()
◆ DDDDD()
◆ drop_back()
|
inline |
Drop last inserted point of the spline.
◆ dump() [1/2]
|
inline |
dump a sample of the spline
◆ dump() [2/2]
|
inline |
dump a sample of the spline
◆ eval()
◆ id_D()
First derivative at x
.
- Parameters
-
x value at which spline is evaluated ni select the component
◆ id_DD()
Second derivative at x
.
- Parameters
-
x value at which spline is evaluated ni select the component
◆ id_DDD()
Third derivative at x
.
- Parameters
-
x value at which spline is evaluated ni select the component
◆ id_DDDD()
4th derivative at x
.
- Parameters
-
x value at which spline is evaluated ni select the component
◆ id_DDDDD()
5th derivative at x
.
- Parameters
-
x value at which spline is evaluated ni select the component
◆ id_eval()
Evaluate spline at x
.
- Parameters
-
x value at which spline is evaluated ni select the component
◆ info() [1/2]
|
inline |
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
true
if spline cannot extend outside interval of definition
◆ is_closed()
|
inline |
- Returns
true
if spline is a closed spline
◆ is_extended_constant()
|
inline |
- Returns
true
if 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 |
Return the number of support points of the spline.
◆ operator()()
◆ order()
|
inline |
- Returns
- the order of the spline (
degree+1
)
◆ push_back()
Add a support point (x,y) to the spline.
◆ reserve()
|
inline |
Allocate memory for npts
points.
◆ set_origin()
|
inline |
Change X-origin of the spline.
◆ set_range()
Change X-range of the spline.
◆ setup()
void Splines::Spline1D::setup | ( | GenericContainer const & | gc | ) |
Build a spline using data in GenericContainer
Setup a spline using a GenericContainer
- gc("spline_type")
- "constant"
- "linear"
- "cubic"
- "akima"
- "bessel"
- "pchip"
- "quintic"
◆ type()
|
inline |
Return spline type (as number).
◆ type_name()
|
inline |
Return spline typename.
◆ write_to_stream()
|
inline |
Print spline coefficients.
◆ x_begin()
|
inline |
Return first node of the spline (x component).
◆ x_end()
|
inline |
Return last node of the spline (x component).
◆ x_max()
|
inline |
Return x-maximum spline value.
◆ x_min()
|
inline |
Return x-minumum spline value.
◆ x_node()
Return the i-th node of the spline (x component).
◆ y_begin()
|
inline |
Return first node of the spline (y component).
◆ y_end()
|
inline |
Return last node of the spline (y component).
◆ y_max()
|
inline |
Return y-maximum spline value (on the support point of the spline).
◆ y_min()
|
inline |
Return y-minumum spline value (on the support point of the spline).
◆ y_node()
Return 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/Splines1D.hxx
- /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Splines/src/Splines1D.cc
Generated by 1.12.0