- 3.0.2 optimal control module.
ct::optcon::LinearSpliner< T, SCALAR > Class Template Reference

The linear spline implementation. More...

#include <LinearSpliner.h>

Inheritance diagram for ct::optcon::LinearSpliner< T, SCALAR >:
ct::optcon::SplinerBase< T, SCALAR >

Public Types

typedef std::vector< vector_t, Eigen::aligned_allocator< vector_t > > vector_array_t
 
typedef Eigen::Matrix< SCALAR, T::DIM, T::DIM > matrix_t
 
- Public Types inherited from ct::optcon::SplinerBase< T, SCALAR >
typedef T vector_t
 
typedef Eigen::Matrix< SCALAR, T::DIM, T::DIM > matrix_t
 
typedef std::vector< vector_t, Eigen::aligned_allocator< vector_t > > vector_array_t
 

Public Member Functions

 LinearSpliner ()=delete
 
 LinearSpliner (std::shared_ptr< tpl::TimeGrid< SCALAR >> grid)
 Custom constructor. More...
 
 ~LinearSpliner () override=default
 
void computeSpline (const vector_array_t &points) override
 Updates the vector on the shots. More...
 
vector_t evalSpline (const SCALAR time, const size_t shotIdx) override
 Depending on the spline type, this method evaluates the control input between the shots. More...
 
vector_t splineDerivative_t (const SCALAR time, const size_t shotIdx) const override
 Returns the spline derivatives with respect to time. More...
 
vector_t splineDerivative_h_i (const SCALAR time, const size_t shotIdx) const override
 Returns the spline derivatives with respect to the time segment between the shots. More...
 
matrix_t splineDerivative_q_i (const SCALAR time, const size_t shotIdx) const override
 Return the spline derivative with respect to the control input at shot i. More...
 
matrix_t splineDerivative_q_iplus1 (const SCALAR time, const size_t shotIdx) const override
 Returns the spline derivative with respect to the control input at shot i+1. More...
 
- Public Member Functions inherited from ct::optcon::SplinerBase< T, SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW SplinerBase ()=default
 Default constructor. More...
 
virtual ~SplinerBase ()=default
 Destructor. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef T vector_t
 

Detailed Description

template<class T, typename SCALAR = double>
class ct::optcon::LinearSpliner< T, SCALAR >

The linear spline implementation.

Template Parameters
TThe vector type to be splined

Member Typedef Documentation

◆ vector_array_t

template<class T , typename SCALAR = double>
typedef std::vector<vector_t, Eigen::aligned_allocator<vector_t> > ct::optcon::LinearSpliner< T, SCALAR >::vector_array_t

◆ matrix_t

template<class T , typename SCALAR = double>
typedef Eigen::Matrix<SCALAR, T::DIM, T::DIM> ct::optcon::LinearSpliner< T, SCALAR >::matrix_t

Constructor & Destructor Documentation

◆ LinearSpliner() [1/2]

template<class T , typename SCALAR = double>
ct::optcon::LinearSpliner< T, SCALAR >::LinearSpliner ( )
delete

◆ LinearSpliner() [2/2]

template<class T , typename SCALAR = double>
ct::optcon::LinearSpliner< T, SCALAR >::LinearSpliner ( std::shared_ptr< tpl::TimeGrid< SCALAR >>  grid)
inline

Custom constructor.

Parameters
[in]gridThe dms timegrid

References grid(), and ct::optcon::LinearSpliner< T, SCALAR >::~LinearSpliner().

◆ ~LinearSpliner()

template<class T , typename SCALAR = double>
ct::optcon::LinearSpliner< T, SCALAR >::~LinearSpliner ( )
overridedefault

Member Function Documentation

◆ computeSpline()

template<class T , typename SCALAR = double>
void ct::optcon::LinearSpliner< T, SCALAR >::computeSpline ( const vector_array_t points)
inlineoverridevirtual

Updates the vector on the shots.

Parameters
[in]pointsUpdated vector array

Implements ct::optcon::SplinerBase< T, SCALAR >.

◆ evalSpline()

template<class T , typename SCALAR = double>
vector_t ct::optcon::LinearSpliner< T, SCALAR >::evalSpline ( const SCALAR  time,
const size_t  shotIdx 
)
inlineoverridevirtual

Depending on the spline type, this method evaluates the control input between the shots.

Parameters
[in]timeThe evaluation time
[in]shotIdxThe shot number
Returns
The splined vector

Implements ct::optcon::SplinerBase< T, SCALAR >.

◆ splineDerivative_t()

template<class T , typename SCALAR = double>
vector_t ct::optcon::LinearSpliner< T, SCALAR >::splineDerivative_t ( const SCALAR  time,
const size_t  shotIdx 
) const
inlineoverridevirtual

Returns the spline derivatives with respect to time.

Parameters
[in]timeThe evaluation time
[in]shotIdxThe shot number
Returns
The time derivative

Implements ct::optcon::SplinerBase< T, SCALAR >.

◆ splineDerivative_h_i()

template<class T , typename SCALAR = double>
vector_t ct::optcon::LinearSpliner< T, SCALAR >::splineDerivative_h_i ( const SCALAR  time,
const size_t  shotIdx 
) const
inlineoverridevirtual

Returns the spline derivatives with respect to the time segment between the shots.

Parameters
[in]timeThe evaluation time
[in]shotIdxThe shot number
Returns
The resulting derivative

Implements ct::optcon::SplinerBase< T, SCALAR >.

◆ splineDerivative_q_i()

template<class T , typename SCALAR = double>
matrix_t ct::optcon::LinearSpliner< T, SCALAR >::splineDerivative_q_i ( const SCALAR  time,
const size_t  shotIdx 
) const
inlineoverridevirtual

Return the spline derivative with respect to the control input at shot i.

Parameters
[in]timeThe evaluation time
[in]shotIdxThe shot number
Returns
The resulting derivative

Implements ct::optcon::SplinerBase< T, SCALAR >.

◆ splineDerivative_q_iplus1()

template<class T , typename SCALAR = double>
matrix_t ct::optcon::LinearSpliner< T, SCALAR >::splineDerivative_q_iplus1 ( const SCALAR  time,
const size_t  shotIdx 
) const
inlineoverridevirtual

Returns the spline derivative with respect to the control input at shot i+1.

Parameters
[in]timeThe evaluation time
[in]shotIdxThe shot number
Returns
The resulting derivative

Implements ct::optcon::SplinerBase< T, SCALAR >.

Member Data Documentation

◆ vector_t

template<class T , typename SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef T ct::optcon::LinearSpliner< T, SCALAR >::vector_t

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