Ember
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ChebyshevFunction Class Reference

Chebyshev polynomial representation of a(t). More...

#include <scalarFunction.h>

Inheritance diagram for ChebyshevFunction:
[legend]

Public Member Functions

 ChebyshevFunction (const ConfigOptions &options)
 
virtual double a (double t) const
 Compute the value of the function at time t.
 
virtual double dadt (double t) const
 Compute the time derivative of the function at time t.
 
virtual void setCoefficients (int n, const double *coeffs)
 The first two elements are the time interval \( (t_0, t_1) \) used to map the time onto the interval (-1, 1).
 
- Public Member Functions inherited from ScalarFunction
 ScalarFunction ()
 
virtual ~ScalarFunction ()
 
virtual void setCoefficients (int n, const double *coeffs)
 Set the parameters associated with this function.
 
virtual double a (double t) const =0
 Compute the value of the function at time t.
 
virtual double dadt (double t) const =0
 Compute the time derivative of the function at time t.
 

Private Attributes

double T0
 
double T1
 
dvec coeffs
 

Detailed Description

Chebyshev polynomial representation of a(t).

\[ a(t) = \sum_{n=0}^N a_n T_n(x) \]

where \( T_n(x) \) are Chebyshev polynomials of the first kind and \( x = 2 * (t-t_o)/(t_1-t_0) - 1 \) maps t onto the interval [-1,1].

Constructor & Destructor Documentation

◆ ChebyshevFunction()

ChebyshevFunction::ChebyshevFunction ( const ConfigOptions options)
explicit

Member Function Documentation

◆ a()

double ChebyshevFunction::a ( double  t) const
virtual

Compute the value of the function at time t.

Implements ScalarFunction.

◆ dadt()

double ChebyshevFunction::dadt ( double  t) const
virtual

Compute the time derivative of the function at time t.

Implements ScalarFunction.

◆ setCoefficients()

void ChebyshevFunction::setCoefficients ( int  n,
const double *  coeffs 
)
virtual

The first two elements are the time interval \( (t_0, t_1) \) used to map the time onto the interval (-1, 1).

The remaining elements are the coefficients used to multiply the Chebyshev polynomials.

Reimplemented from ScalarFunction.

Member Data Documentation

◆ T0

double ChebyshevFunction::T0
private

◆ T1

double ChebyshevFunction::T1
private

◆ coeffs

dvec ChebyshevFunction::coeffs
private

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