Eigen-unsupported  3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)
Eigen::Spline< Scalar_, Dim_, Degree_ > Class Template Reference

Detailed Description

template<typename Scalar_, int Dim_, int Degree_>
class Eigen::Spline< Scalar_, Dim_, Degree_ >

A class representing multi-dimensional spline curves.

The class represents B-splines with non-uniform knot vectors. Each control point of the B-spline is associated with a basis function

\begin{align*} C(u) & = \sum_{i=0}^{n}N_{i,p}(u)P_i \end{align*}

Template Parameters
Scalar_The underlying data type (typically float or double)
Dim_The curve dimension (e.g. 2 or 3)
Degree_Per default set to Dynamic; could be set to the actual desired degree for optimization purposes (would result in stack allocation of several temporary variables).

Public Types

enum  { Dimension }
 
enum  { Degree }
 
typedef SplineTraits< Spline >::BasisDerivativeType BasisDerivativeType
 The data type used to store the values of the basis function derivatives.
 
typedef SplineTraits< Spline >::BasisVectorType BasisVectorType
 The data type used to store non-zero basis functions.
 
typedef SplineTraits< Spline >::ControlPointVectorType ControlPointVectorType
 The data type representing the spline's control points.
 
typedef SplineTraits< Spline >::KnotVectorType KnotVectorType
 The data type used to store knot vectors.
 
typedef SplineTraits< Spline >::ParameterVectorType ParameterVectorType
 The data type used to store parameter vectors.
 
typedef SplineTraits< Spline >::PointType PointType
 The point type the spline is representing.
 
typedef Scalar_ Scalar
 

Public Member Functions

SplineTraits< Spline >::BasisDerivativeType basisFunctionDerivatives (Scalar u, DenseIndex order) const
 Computes the non-zero spline basis function derivatives up to given order. More...
 
template<int DerivativeOrder>
SplineTraits< Spline, DerivativeOrder >::BasisDerivativeType basisFunctionDerivatives (Scalar u, DenseIndex order=DerivativeOrder) const
 Computes the non-zero spline basis function derivatives up to given order. More...
 
SplineTraits< Spline >::BasisVectorType basisFunctions (Scalar u) const
 Computes the non-zero basis functions at the given site. More...
 
const ControlPointVectorTypectrls () const
 Returns the ctrls of the underlying spline.
 
DenseIndex degree () const
 Returns the spline degree.
 
SplineTraits< Spline >::DerivativeType derivatives (Scalar u, DenseIndex order) const
 Evaluation of spline derivatives of up-to given order. More...
 
template<int DerivativeOrder>
SplineTraits< Spline, DerivativeOrder >::DerivativeType derivatives (Scalar u, DenseIndex order=DerivativeOrder) const
 Evaluation of spline derivatives of up-to given order. More...
 
const KnotVectorTypeknots () const
 Returns the knots of the underlying spline.
 
PointType operator() (Scalar u) const
 Returns the spline value at a given site \(u\). More...
 
DenseIndex span (Scalar u) const
 Returns the span within the knot vector in which u is falling. More...
 
 Spline ()
 Creates a (constant) zero spline. For Splines with dynamic degree, the resulting degree will be 0.
 
template<typename OtherVectorType , typename OtherArrayType >
 Spline (const OtherVectorType &knots, const OtherArrayType &ctrls)
 Creates a spline from a knot vector and control points. More...
 
template<int OtherDegree>
 Spline (const Spline< Scalar, Dimension, OtherDegree > &spline)
 Copy constructor for splines. More...
 

Static Public Member Functions

static BasisDerivativeType BasisFunctionDerivatives (const Scalar u, const DenseIndex order, const DenseIndex degree, const KnotVectorType &knots)
 Computes the non-zero spline basis function derivatives up to given order. More...
 
static BasisVectorType BasisFunctions (Scalar u, DenseIndex degree, const KnotVectorType &knots)
 Returns the spline's non-zero basis functions. More...
 
static DenseIndex Span (typename SplineTraits< Spline >::Scalar u, DenseIndex degree, const typename SplineTraits< Spline >::KnotVectorType &knots)
 Computes the span within the provided knot vector in which u is falling.
 

Member Typedef Documentation

◆ Scalar

template<typename Scalar_ , int Dim_, int Degree_>
typedef Scalar_ Eigen::Spline< Scalar_, Dim_, Degree_ >::Scalar

The spline curve's scalar type.

Member Enumeration Documentation

◆ anonymous enum

template<typename Scalar_ , int Dim_, int Degree_>
anonymous enum
Enumerator
Dimension 

The spline curve's dimension.

◆ anonymous enum

template<typename Scalar_ , int Dim_, int Degree_>
anonymous enum
Enumerator
Degree 

The spline curve's degree.

Constructor & Destructor Documentation

◆ Spline() [1/2]

template<typename Scalar_ , int Dim_, int Degree_>
template<typename OtherVectorType , typename OtherArrayType >
Eigen::Spline< Scalar_, Dim_, Degree_ >::Spline ( const OtherVectorType &  knots,
const OtherArrayType &  ctrls 
)
inline

Creates a spline from a knot vector and control points.

Parameters
knotsThe spline's knot vector.
ctrlsThe spline's control point vector.

◆ Spline() [2/2]

template<typename Scalar_ , int Dim_, int Degree_>
template<int OtherDegree>
Eigen::Spline< Scalar_, Dim_, Degree_ >::Spline ( const Spline< Scalar, Dimension, OtherDegree > &  spline)
inline

Copy constructor for splines.

Parameters
splineThe input spline.

Member Function Documentation

◆ BasisFunctionDerivatives()

template<typename Scalar_ , int Dim_, int Degree_>
SplineTraits< Spline< Scalar_, Dim_, Degree_ > >::BasisDerivativeType Eigen::Spline< Scalar_, Dim_, Degree_ >::BasisFunctionDerivatives ( const Scalar  u,
const DenseIndex  order,
const DenseIndex  degree,
const KnotVectorType knots 
)
static

Computes the non-zero spline basis function derivatives up to given order.

The function computes

\begin{align*} \frac{d^i}{du^i} N_{i,p}(u), \hdots, \frac{d^i}{du^i} N_{i+p+1,p}(u) \end{align*}

with i ranging from 0 up to the specified order.

Parameters
uParameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed.
orderThe order up to which the basis function derivatives are computes.
degreeThe degree of the underlying spline
knotsThe underlying spline's knot vector.

◆ basisFunctionDerivatives() [1/2]

template<typename Scalar_ , int Dim_, int Degree_>
SplineTraits< Spline< Scalar_, Dim_, Degree_ >, DerivativeOrder >::BasisDerivativeType Eigen::Spline< Scalar_, Dim_, Degree_ >::basisFunctionDerivatives ( Scalar  u,
DenseIndex  order 
) const

Computes the non-zero spline basis function derivatives up to given order.

The function computes

\begin{align*} \frac{d^i}{du^i} N_{i,p}(u), \hdots, \frac{d^i}{du^i} N_{i+p+1,p}(u) \end{align*}

with i ranging from 0 up to the specified order.

Parameters
uParameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed.
orderThe order up to which the basis function derivatives are computes.

◆ basisFunctionDerivatives() [2/2]

template<typename Scalar_ , int Dim_, int Degree_>
template<int DerivativeOrder>
SplineTraits<Spline,DerivativeOrder>::BasisDerivativeType Eigen::Spline< Scalar_, Dim_, Degree_ >::basisFunctionDerivatives ( Scalar  u,
DenseIndex  order = DerivativeOrder 
) const

Computes the non-zero spline basis function derivatives up to given order.

The function computes

\begin{align*} \frac{d^i}{du^i} N_{i,p}(u), \hdots, \frac{d^i}{du^i} N_{i+p+1,p}(u) \end{align*}

with i ranging from 0 up to the specified order.

Parameters
uParameter \(u \in [0;1]\) at which the non-zero basis function derivatives are computed.
orderThe order up to which the basis function derivatives are computes. Using the template version of this function is more efficieent since temporary objects are allocated on the stack whenever this is possible.

◆ basisFunctions()

template<typename Scalar_ , int Dim_, int Degree_>
SplineTraits< Spline< Scalar_, Dim_, Degree_ > >::BasisVectorType Eigen::Spline< Scalar_, Dim_, Degree_ >::basisFunctions ( Scalar  u) const

Computes the non-zero basis functions at the given site.

Splines have local support and a point from their image is defined by exactly \(p+1\) control points \(P_i\) where \(p\) is the spline degree.

This function computes the \(p+1\) non-zero basis function values for a given parameter value \(u\). It returns

\begin{align*} N_{i,p}(u), \hdots, N_{i+p+1,p}(u) \end{align*}

Parameters
uParameter \(u \in [0;1]\) at which the non-zero basis functions are computed.

◆ BasisFunctions()

template<typename Scalar_ , int Dim_, int Degree_>
Spline< Scalar_, Dim_, Degree_ >::BasisVectorType Eigen::Spline< Scalar_, Dim_, Degree_ >::BasisFunctions ( Scalar  u,
DenseIndex  degree,
const KnotVectorType knots 
)
static

Returns the spline's non-zero basis functions.

The function computes and returns

\begin{align*} N_{i,p}(u), \hdots, N_{i+p+1,p}(u) \end{align*}

Parameters
uThe site at which the basis functions are computed.
degreeThe degree of the underlying spline.
knotsThe underlying spline's knot vector.

◆ derivatives() [1/2]

template<typename Scalar_ , int Dim_, int Degree_>
SplineTraits< Spline< Scalar_, Dim_, Degree_ >, DerivativeOrder >::DerivativeType Eigen::Spline< Scalar_, Dim_, Degree_ >::derivatives ( Scalar  u,
DenseIndex  order 
) const

Evaluation of spline derivatives of up-to given order.

The function returns

\begin{align*} \frac{d^i}{du^i}C(u) & = \sum_{i=0}^{n} \frac{d^i}{du^i} N_{i,p}(u)P_i \end{align*}

for i ranging between 0 and order.

Parameters
uParameter \(u \in [0;1]\) at which the spline derivative is evaluated.
orderThe order up to which the derivatives are computed.

◆ derivatives() [2/2]

template<typename Scalar_ , int Dim_, int Degree_>
template<int DerivativeOrder>
SplineTraits<Spline,DerivativeOrder>::DerivativeType Eigen::Spline< Scalar_, Dim_, Degree_ >::derivatives ( Scalar  u,
DenseIndex  order = DerivativeOrder 
) const

Evaluation of spline derivatives of up-to given order.

The function returns

\begin{align*} \frac{d^i}{du^i}C(u) & = \sum_{i=0}^{n} \frac{d^i}{du^i} N_{i,p}(u)P_i \end{align*}

for i ranging between 0 and order.

Parameters
uParameter \(u \in [0;1]\) at which the spline derivative is evaluated.
orderThe order up to which the derivatives are computed. Using the template version of this function is more efficieent since temporary objects are allocated on the stack whenever this is possible.

◆ operator()()

template<typename Scalar_ , int Dim_, int Degree_>
Spline< Scalar_, Dim_, Degree_ >::PointType Eigen::Spline< Scalar_, Dim_, Degree_ >::operator() ( Scalar  u) const

Returns the spline value at a given site \(u\).

The function returns

\begin{align*} C(u) & = \sum_{i=0}^{n}N_{i,p}P_i \end{align*}

Parameters
uParameter \(u \in [0;1]\) at which the spline is evaluated.
Returns
The spline value at the given location \(u\).

◆ span()

template<typename Scalar_ , int Dim_, int Degree_>
DenseIndex Eigen::Spline< Scalar_, Dim_, Degree_ >::span ( Scalar  u) const

Returns the span within the knot vector in which u is falling.

Parameters
uThe site for which the span is determined.

The documentation for this class was generated from the following file: