SplineVec Class ReferenceΒΆ

Splines: Splines::SplineVec Class Reference
Splines
Splines::SplineVec Class Reference

#include <SplineVec.hxx>

Public Member Functions

 SplineVec (SplineVec const &)=delete
 
SplineVec const & operator= (SplineVec const &)=delete
 
void search (std::pair< integer, real_type > &res) const
 
string const & name () const
 
real_type curvature (real_type x) const
 
real_type curvature_D (real_type x) const
 
SplineType1D type () const
 
string info () const
 
void info (ostream_type &stream) const
 
void dump_table (ostream_type &s, integer num_points) const
 
Constructors
 SplineVec (string const &name="SplineVec")
 spline constructor
 
virtual ~SplineVec ()
 spline destructor
 
Open/Close
bool is_closed () const
 
void make_closed ()
 
void make_open ()
 
bool can_extend () const
 
void make_unbounded ()
 
void make_buonded ()
 
Info
integer num_points () const
 
integer dimension () const
 
real_type const * x_nodes () const
 
real_type x_node (integer npt) const
 
real_type const * y_nodes (integer j) const
 
real_type y_node (integer npt, integer j) const
 
real_type x_min () const
 
real_type x_max () const
 
Evaluation when segment is known.
real_type eval (real_type x, integer i) const
 
real_type operator() (real_type x, integer i) const
 
real_type D (real_type x, integer i) const
 
real_type eval_D (real_type x, integer i) const
 
real_type DD (real_type x, integer i) const
 
real_type eval_DD (real_type x, integer i) const
 
real_type DDD (real_type x, integer i) const
 
real_type eval_DDD (real_type x, integer i) const
 
real_type DDDD (real_type x, integer i) const
 
real_type eval_DDDD (real_type x, integer i) const
 
real_type DDDDD (real_type x, integer i) const
 
real_type eval_DDDDD (real_type x, integer i) const
 
Evaluate all the splines in a vector.
void eval (real_type x, real_type vals[], integer inc) const
 
void eval_D (real_type x, real_type vals[], integer inc) const
 
void eval_DD (real_type x, real_type vals[], integer inc) const
 
void eval_DDD (real_type x, real_type vals[], integer inc) const
 
void eval_DDDD (real_type x, real_type vals[], integer inc) const
 
void eval_DDDDD (real_type x, real_type vals[], integer inc) const
 
Evaluate all the splines in an STL vector
void eval (real_type x, vector< real_type > &vals) const
 
void eval_D (real_type x, vector< real_type > &vals) const
 
void eval_DD (real_type x, vector< real_type > &vals) const
 
void eval_DDD (real_type x, vector< real_type > &vals) const
 
void eval_DDDD (real_type x, vector< real_type > &vals) const
 
void eval_DDDDD (real_type x, vector< real_type > &vals) const
 
Evaluate all the splines in a <tt>GenericContainer</tt>.
void eval (real_type x, GenericContainer &vals) const
 
void eval_D (real_type x, GenericContainer &vals) const
 
void eval_DD (real_type x, GenericContainer &vals) const
 
void eval_DDD (real_type x, GenericContainer &vals) const
 
void eval_DDDD (real_type x, GenericContainer &vals) const
 
void eval_DDDDD (real_type x, GenericContainer &vals) const
 
Evaluate all the splines in a point set in a <tt>GenericContainer</tt>
void eval (vec_real_type const &x, GenericContainer &vals) const
 
void eval_D (vec_real_type const &x, GenericContainer &vals) const
 
void eval_DD (vec_real_type const &x, GenericContainer &vals) const
 
void eval_DDD (vec_real_type const &x, GenericContainer &vals) const
 
void eval_DDDD (vec_real_type const &x, GenericContainer &vals) const
 
void eval_DDDDD (vec_real_type const &x, GenericContainer &vals) const
 
Setup Splines.
void setup (integer dim, integer npts, real_type const *Y[])
 
void setup (integer dim, integer npts, real_type const Y[], integer ldY)
 
void set_knots (real_type const X[])
 
void set_knots_chord_length ()
 
void set_knots_centripetal ()
 
void set_knots_foley ()
 
void catmull_rom ()
 
void build (GenericContainer const &gc)
 
void setup (GenericContainer const &gc)
 

Detailed Description

Splines Management Class

Constructor & Destructor Documentation

◆ SplineVec()

Splines::SplineVec::SplineVec ( string const & name = "SplineVec")

spline constructor

Build an empty spline of SplineVec type

Parameters
namethe name of the spline

◆ ~SplineVec()

Splines::SplineVec::~SplineVec ( )
virtual

spline destructor

Spline destructor.

Member Function Documentation

◆ build()

void Splines::SplineVec::build ( GenericContainer const & gc)
inline

Build a spline using data in GenericContainer

◆ can_extend()

bool Splines::SplineVec::can_extend ( ) const
inline
Returns
true if spline can extend outside interval of definition

◆ catmull_rom()

void Splines::SplineVec::catmull_rom ( )

Computes the spline using Catmull Rom algorithm. Points and nodes must be previously stored.

◆ curvature()

real_type Splines::SplineVec::curvature ( real_type x) const

Compute spline curvature at x.

◆ curvature_D()

real_type Splines::SplineVec::curvature_D ( real_type x) const

Compute spline curvature derivative at x.

◆ D()

real_type Splines::SplineVec::D ( real_type x,
integer i ) const

First derivative value at x component i-th.

◆ DD()

real_type Splines::SplineVec::DD ( real_type x,
integer i ) const

Second derivative value at x component i-th.

◆ DDD()

real_type Splines::SplineVec::DDD ( real_type x,
integer i ) const

Third derivative value at x component i-th.

◆ DDDD()

real_type Splines::SplineVec::DDDD ( real_type x,
integer i ) const

4th derivative value at x component i-th.

◆ DDDDD()

real_type Splines::SplineVec::DDDDD ( real_type x,
integer i ) const

5th derivative value at x component i-th.

◆ dimension()

integer Splines::SplineVec::dimension ( ) const
inline

Return the number splines in the spline set.

◆ dump_table()

void Splines::SplineVec::dump_table ( ostream_type & s,
integer num_points ) const

Dump values of the spline on a stream for plotting

◆ eval() [1/5]

void Splines::SplineVec::eval ( real_type x,
GenericContainer & vals ) const
inline

Evaluate at x and fill a GenericContainer

◆ eval() [2/5]

real_type Splines::SplineVec::eval ( real_type x,
integer i ) const

Evaluate spline value at x component i-th.

◆ eval() [3/5]

void Splines::SplineVec::eval ( real_type x,
real_type vals[],
integer inc ) const

Evaluate all the splines at x and store values in vals with stride inc.

◆ eval() [4/5]

void Splines::SplineVec::eval ( real_type x,
vector< real_type > & vals ) const

Evaluate all the splines at x and store values in vals.

◆ eval() [5/5]

void Splines::SplineVec::eval ( vec_real_type const & x,
GenericContainer & vals ) const

Evaluate at x (x is a vector with many values) and fill a GenericContainer

Evaluate at x and fill a GenericContainer

◆ eval_D() [1/5]

void Splines::SplineVec::eval_D ( real_type x,
GenericContainer & vals ) const
inline

Evaluate first derivatives at x and fill a GenericContainer

◆ eval_D() [2/5]

real_type Splines::SplineVec::eval_D ( real_type x,
integer i ) const
inline

First derivative value at x component i-th.

◆ eval_D() [3/5]

void Splines::SplineVec::eval_D ( real_type x,
real_type vals[],
integer inc ) const

Evaluate the fist derivative of all the splines at x and store values in vals with stride inc.

◆ eval_D() [4/5]

void Splines::SplineVec::eval_D ( real_type x,
vector< real_type > & vals ) const

Evaluate the fist derivative of all the splines at x and store values in vals.

◆ eval_D() [5/5]

void Splines::SplineVec::eval_D ( vec_real_type const & x,
GenericContainer & vals ) const

Evaluate first derivative at x (x is a vector with many values) and fill a GenericContainer

◆ eval_DD() [1/5]

void Splines::SplineVec::eval_DD ( real_type x,
GenericContainer & vals ) const
inline

Evaluate second derivatives at x and fill a GenericContainer

◆ eval_DD() [2/5]

real_type Splines::SplineVec::eval_DD ( real_type x,
integer i ) const
inline

Second derivative value at x component i-th.

◆ eval_DD() [3/5]

void Splines::SplineVec::eval_DD ( real_type x,
real_type vals[],
integer inc ) const

Evaluate the second derivative of all the splines at x and store values in vals with stride inc.

◆ eval_DD() [4/5]

void Splines::SplineVec::eval_DD ( real_type x,
vector< real_type > & vals ) const

Evaluate the second derivative of all the splines at x and store values in vals.

◆ eval_DD() [5/5]

void Splines::SplineVec::eval_DD ( vec_real_type const & x,
GenericContainer & vals ) const

Evaluate second derivative at x (x is a vector with many values) and fill a GenericContainer

◆ eval_DDD() [1/5]

void Splines::SplineVec::eval_DDD ( real_type x,
GenericContainer & vals ) const
inline

Evaluate third derivatives at x and fill a GenericContainer

◆ eval_DDD() [2/5]

real_type Splines::SplineVec::eval_DDD ( real_type x,
integer i ) const
inline

Third derivative value at x component i-th.

◆ eval_DDD() [3/5]

void Splines::SplineVec::eval_DDD ( real_type x,
real_type vals[],
integer inc ) const

Evaluate the third derivative of all the splines at x and store values in vals with stride inc.

◆ eval_DDD() [4/5]

void Splines::SplineVec::eval_DDD ( real_type x,
vector< real_type > & vals ) const

Evaluate the third derivative of all the splines at x and store values in vals.

◆ eval_DDD() [5/5]

void Splines::SplineVec::eval_DDD ( vec_real_type const & x,
GenericContainer & vals ) const

Evaluate third derivative at x (x is a vector with many values) and fill a GenericContainer

◆ eval_DDDD() [1/5]

void Splines::SplineVec::eval_DDDD ( real_type x,
GenericContainer & vals ) const
inline

Evaluate 4th derivatives at x and fill a GenericContainer

◆ eval_DDDD() [2/5]

real_type Splines::SplineVec::eval_DDDD ( real_type x,
integer i ) const
inline

4th derivative value at x component i-th.

◆ eval_DDDD() [3/5]

void Splines::SplineVec::eval_DDDD ( real_type x,
real_type vals[],
integer inc ) const

Evaluate the 4th derivative of all the splines at x and store values in vals with stride inc.

◆ eval_DDDD() [4/5]

void Splines::SplineVec::eval_DDDD ( real_type x,
vector< real_type > & vals ) const

Evaluate the 4th derivative of all the splines at x and store values in vals.

◆ eval_DDDD() [5/5]

void Splines::SplineVec::eval_DDDD ( vec_real_type const & x,
GenericContainer & vals ) const

Evaluate 4th derivative at x (x is a vector with many values) and fill a GenericContainer

◆ eval_DDDDD() [1/5]

void Splines::SplineVec::eval_DDDDD ( real_type x,
GenericContainer & vals ) const
inline

Evaluate 5th derivatives at x and fill a GenericContainer

◆ eval_DDDDD() [2/5]

real_type Splines::SplineVec::eval_DDDDD ( real_type x,
integer i ) const
inline

5th derivative value at x component i-th.

◆ eval_DDDDD() [3/5]

void Splines::SplineVec::eval_DDDDD ( real_type x,
real_type vals[],
integer inc ) const

Evaluate the 5th derivative of all the splines at x and store values in vals with stride inc.

◆ eval_DDDDD() [4/5]

void Splines::SplineVec::eval_DDDDD ( real_type x,
vector< real_type > & vals ) const

Evaluate the 5th derivative of all the splines at x and store values in vals.

◆ eval_DDDDD() [5/5]

void Splines::SplineVec::eval_DDDDD ( vec_real_type const & x,
GenericContainer & vals ) const

Evaluate 5th derivative at x (x is a vector with many values) and fill a GenericContainer

◆ info() [1/2]

string Splines::SplineVec::info ( ) const

String information of the kind and order of the spline

◆ info() [2/2]

void Splines::SplineVec::info ( ostream_type & stream) const
inline

Print information of the kind and order of the spline

◆ is_closed()

bool Splines::SplineVec::is_closed ( ) const
inline
Returns
true if spline is a closed spline

◆ make_buonded()

void Splines::SplineVec::make_buonded ( )
inline

Set spline as bounded. When evaluated if parameter is outside the domain an error is issued.

◆ make_closed()

void Splines::SplineVec::make_closed ( )
inline

Set spline as a closed spline. When evaluated if parameter is outside the domain is wrapped cyclically before evalation.

◆ make_open()

void Splines::SplineVec::make_open ( )
inline

Set spline as an opened spline. When evaluated if parameter is outside the domain an error is produced.

◆ make_unbounded()

void Splines::SplineVec::make_unbounded ( )
inline

Set spline as unbounded. When evaluated if parameter is outside the domain an extrapolated value is used.

◆ name()

string const & Splines::SplineVec::name ( ) const
inline

Spline name usd in the constructor

◆ num_points()

integer Splines::SplineVec::num_points ( ) const
inline

Return the number of support points of the splines.

◆ operator()()

real_type Splines::SplineVec::operator() ( real_type x,
integer i ) const
inline

Evaluate spline value at x component i-th.

◆ search()

void Splines::SplineVec::search ( std::pair< integer, real_type > & res) const

Search the segment containing x

◆ set_knots()

void Splines::SplineVec::set_knots ( real_type const X[])

Set the knots of the spline.

◆ set_knots_centripetal()

void Splines::SplineVec::set_knots_centripetal ( )

Computes the knots of the spline using centripetal approach.

◆ set_knots_chord_length()

void Splines::SplineVec::set_knots_chord_length ( )

Computes the knots of the spline using chordal length.

◆ set_knots_foley()

void Splines::SplineVec::set_knots_foley ( )

Computes the knots of the spline using Foley algorithm.

◆ setup() [1/3]

void Splines::SplineVec::setup ( GenericContainer const & gc)

Build a spline using data in GenericContainer

◆ setup() [2/3]

void Splines::SplineVec::setup ( integer dim,
integer npts,
real_type const * Y[] )

Initialize the interpolation point of the splines.

Parameters
[in]dimthe dimension of the points
[in]nptsthe numeber of interpolation points
[in]Ythe matrix of points values, Y[i] is the pointer to the i-th components

◆ setup() [3/3]

void Splines::SplineVec::setup ( integer dim,
integer npts,
real_type const Y[],
integer ldY )

Initialize the interpolation point of the splines.

Parameters
[in]dimthe dimension of the points
[in]nptsthe numeber of interpolation points
[in]Ythe matrix of points values
[in]ldYleading dimension of the matrix

◆ type()

SplineType1D Splines::SplineVec::type ( ) const
inline

Return spline type (as number).

◆ x_max()

real_type Splines::SplineVec::x_max ( ) const
inline

Return x-maximum spline value.

◆ x_min()

real_type Splines::SplineVec::x_min ( ) const
inline

Return x-minumum spline value.

◆ x_node()

real_type Splines::SplineVec::x_node ( integer npt) const
inline

Return the npt-th node of the spline (x component).

◆ x_nodes()

real_type const * Splines::SplineVec::x_nodes ( ) const
inline

Return the vector of values of x-nodes.

◆ y_node()

real_type Splines::SplineVec::y_node ( integer npt,
integer j ) const
inline

Return the npt-th node of the spline (j component of y).

◆ y_nodes()

real_type const * Splines::SplineVec::y_nodes ( integer j) const
inline

Return the vector of values of y-nodes, component j


The documentation for this class was generated from the following files:
  • /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Splines/src/Splines/SplineVec.hxx
  • /Users/enrico/Ricerca/develop/PINS/pins-mechatronix/LibSources/submodules/Splines/src/SplineVec.cc