Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
Eigen::Spline< _Scalar, _Dim, _Degree > Class Template Reference

A class representing multi-dimensional spline curves. More...

#include <Spline.h>

Public Types

enum  { Dimension = _Dim }
 
enum  { Degree = _Degree }
 
typedef SplineTraits< Spline >::BasisDerivativeType BasisDerivativeType
 The data type used to store the values of the basis function derivatives. More...
 
typedef SplineTraits< Spline >::BasisVectorType BasisVectorType
 The data type used to store non-zero basis functions. More...
 
typedef SplineTraits< Spline >::ControlPointVectorType ControlPointVectorType
 The data type representing the spline's control points. More...
 
typedef SplineTraits< Spline >::KnotVectorType KnotVectorType
 The data type used to store knot vectors. More...
 
typedef SplineTraits< Spline >::ParameterVectorType ParameterVectorType
 The data type used to store parameter vectors. More...
 
typedef SplineTraits< Spline >::PointType PointType
 The point type the spline is representing. More...
 
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. More...
 
DenseIndex degree () const
 Returns the spline degree. More...
 
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. More...
 
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. More...
 
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. More...
 

Static Private Member Functions

template<typename DerivativeType >
static void BasisFunctionDerivativesImpl (const typename Spline< _Scalar, _Dim, _Degree >::Scalar u, const DenseIndex order, const DenseIndex p, const typename Spline< _Scalar, _Dim, _Degree >::KnotVectorType &U, DerivativeType &N_)
 

Private Attributes

ControlPointVectorType m_ctrls
 
KnotVectorType m_knots
 

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
_ScalarThe underlying data type (typically float or double)
_DimThe curve dimension (e.g. 2 or 3)
_DegreePer default set to Dynamic; could be set to the actual desired degree for optimization purposes (would result in stack allocation of several temporary variables).

Definition at line 35 of file Spline.h.

Member Typedef Documentation

◆ BasisDerivativeType

template<typename _Scalar, int _Dim, int _Degree>
typedef SplineTraits<Spline>::BasisDerivativeType Eigen::Spline< _Scalar, _Dim, _Degree >::BasisDerivativeType

The data type used to store the values of the basis function derivatives.

Definition at line 55 of file Spline.h.

◆ BasisVectorType

template<typename _Scalar, int _Dim, int _Degree>
typedef SplineTraits<Spline>::BasisVectorType Eigen::Spline< _Scalar, _Dim, _Degree >::BasisVectorType

The data type used to store non-zero basis functions.

Definition at line 52 of file Spline.h.

◆ ControlPointVectorType

template<typename _Scalar, int _Dim, int _Degree>
typedef SplineTraits<Spline>::ControlPointVectorType Eigen::Spline< _Scalar, _Dim, _Degree >::ControlPointVectorType

The data type representing the spline's control points.

Definition at line 58 of file Spline.h.

◆ KnotVectorType

template<typename _Scalar, int _Dim, int _Degree>
typedef SplineTraits<Spline>::KnotVectorType Eigen::Spline< _Scalar, _Dim, _Degree >::KnotVectorType

The data type used to store knot vectors.

Definition at line 46 of file Spline.h.

◆ ParameterVectorType

template<typename _Scalar, int _Dim, int _Degree>
typedef SplineTraits<Spline>::ParameterVectorType Eigen::Spline< _Scalar, _Dim, _Degree >::ParameterVectorType

The data type used to store parameter vectors.

Definition at line 49 of file Spline.h.

◆ PointType

template<typename _Scalar, int _Dim, int _Degree>
typedef SplineTraits<Spline>::PointType Eigen::Spline< _Scalar, _Dim, _Degree >::PointType

The point type the spline is representing.

Definition at line 43 of file Spline.h.

◆ Scalar

template<typename _Scalar, int _Dim, int _Degree>
typedef _Scalar Eigen::Spline< _Scalar, _Dim, _Degree >::Scalar

The spline curve's scalar type.

Definition at line 38 of file Spline.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename _Scalar, int _Dim, int _Degree>
anonymous enum
Enumerator
Dimension 

The spline curve's dimension.

Definition at line 39 of file Spline.h.

◆ anonymous enum

template<typename _Scalar, int _Dim, int _Degree>
anonymous enum
Enumerator
Degree 

The spline curve's degree.

Definition at line 40 of file Spline.h.

Constructor & Destructor Documentation

◆ Spline() [1/3]

template<typename _Scalar, int _Dim, int _Degree>
Eigen::Spline< _Scalar, _Dim, _Degree >::Spline ( )
inline

Creates a (constant) zero spline. For Splines with dynamic degree, the resulting degree will be 0.

Definition at line 64 of file Spline.h.

◆ Spline() [2/3]

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.

Definition at line 81 of file Spline.h.

◆ Spline() [3/3]

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.

Definition at line 88 of file Spline.h.

Member Function Documentation

◆ 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.

Definition at line 476 of file Spline.h.

◆ 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.

◆ 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.

Definition at line 495 of file Spline.h.

◆ BasisFunctionDerivativesImpl()

template<typename _Scalar , int _Dim, int _Degree>
template<typename DerivativeType >
void Eigen::Spline< _Scalar, _Dim, _Degree >::BasisFunctionDerivativesImpl ( const typename Spline< _Scalar, _Dim, _Degree >::Scalar  u,
const DenseIndex  order,
const DenseIndex  p,
const typename Spline< _Scalar, _Dim, _Degree >::KnotVectorType U,
DerivativeType &  N_ 
)
staticprivate

Definition at line 371 of file Spline.h.

◆ 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.

Definition at line 361 of file Spline.h.

◆ 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.

Definition at line 247 of file Spline.h.

◆ ctrls()

template<typename _Scalar, int _Dim, int _Degree>
const ControlPointVectorType& Eigen::Spline< _Scalar, _Dim, _Degree >::ctrls ( ) const
inline

Returns the ctrls of the underlying spline.

Definition at line 99 of file Spline.h.

◆ degree()

template<typename _Scalar , int _Dim, int _Degree>
DenseIndex Eigen::Spline< _Scalar, _Dim, _Degree >::degree ( ) const

Returns the spline degree.

Definition at line 280 of file Spline.h.

◆ 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.

Definition at line 342 of file Spline.h.

◆ 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.

◆ knots()

template<typename _Scalar, int _Dim, int _Degree>
const KnotVectorType& Eigen::Spline< _Scalar, _Dim, _Degree >::knots ( ) const
inline

Returns the knots of the underlying spline.

Definition at line 94 of file Spline.h.

◆ 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$.

Definition at line 295 of file Spline.h.

◆ 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.

Definition at line 289 of file Spline.h.

◆ Span()

template<typename _Scalar , int _Dim, int _Degree>
DenseIndex Eigen::Spline< _Scalar, _Dim, _Degree >::Span ( typename SplineTraits< Spline< _Scalar, _Dim, _Degree > >::Scalar  u,
DenseIndex  degree,
const typename SplineTraits< Spline< _Scalar, _Dim, _Degree > >::KnotVectorType knots 
)
static

Computes the span within the provided knot vector in which u is falling.

Definition at line 234 of file Spline.h.

Member Data Documentation

◆ m_ctrls

template<typename _Scalar, int _Dim, int _Degree>
ControlPointVectorType Eigen::Spline< _Scalar, _Dim, _Degree >::m_ctrls
private

Control points.

Definition at line 222 of file Spline.h.

◆ m_knots

template<typename _Scalar, int _Dim, int _Degree>
KnotVectorType Eigen::Spline< _Scalar, _Dim, _Degree >::m_knots
private

Knot vector.

Definition at line 221 of file Spline.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:43:33