Public Types | Static Public Member Functions | List of all members
gtsam::Chebyshev2 Class Reference

#include <Chebyshev2.h>

Inheritance diagram for gtsam::Chebyshev2:
Inheritance graph
[legend]

Public Types

using Base = Basis< Chebyshev2 >
 
using DiffMatrix = Eigen::Matrix< double, -1, -1 >
 
using Parameters = Eigen::Matrix< double, -1, 1 >
 

Static Public Member Functions

static Weights CalculateWeights (size_t N, double x, double a=-1, double b=1)
 
static Weights DerivativeWeights (size_t N, double x, double a=-1, double b=1)
 
static DiffMatrix DifferentiationMatrix (size_t N, double a=-1, double b=1)
 
static Weights IntegrationWeights (size_t N, double a=-1, double b=1)
 
template<size_t M>
static Matrix matrix (std::function< Eigen::Matrix< double, M, 1 >(double)> f, size_t N, double a=-1, double b=1)
 
static double Point (size_t N, int j)
 Specific Chebyshev point. More...
 
static double Point (size_t N, int j, double a, double b)
 Specific Chebyshev point, within [a,b] interval. More...
 
static Vector Points (size_t N)
 All Chebyshev points. More...
 
static Vector Points (size_t N, double a, double b)
 All Chebyshev points, within [a,b] interval. More...
 
- Static Public Member Functions inherited from gtsam::Basis< Chebyshev2 >
static Matrix WeightMatrix (size_t N, const Vector &X)
 
static Matrix WeightMatrix (size_t N, const Vector &X, double a, double b)
 Calculate weights for all x in vector X, with interval [a,b]. More...
 

Detailed Description

Chebyshev Interpolation on Chebyshev points of the second kind Note that N here, the number of points, is one less than N from 'Approximation Theory and Approximation Practice by L. N. Trefethen (pg.42)'.

Definition at line 46 of file Chebyshev2.h.

Member Typedef Documentation

◆ Base

Definition at line 50 of file Chebyshev2.h.

◆ DiffMatrix

Definition at line 52 of file Chebyshev2.h.

◆ Parameters

Definition at line 51 of file Chebyshev2.h.

Member Function Documentation

◆ CalculateWeights()

Weights gtsam::Chebyshev2::CalculateWeights ( size_t  N,
double  x,
double  a = -1,
double  b = 1 
)
static

Evaluate Chebyshev Weights on [-1,1] at any x up to order N-1 (N values) These weights implement barycentric interpolation at a specific x. More precisely, f(x) ~ [w0;...;wN] * [f0;...;fN], where the fj are the values of the function f at the Chebyshev points. As such, for a given x we obtain a linear map from parameter vectors f to interpolated values f(x). Optional [a,b] interval can be specified as well.

Definition at line 23 of file Chebyshev2.cpp.

◆ DerivativeWeights()

Weights gtsam::Chebyshev2::DerivativeWeights ( size_t  N,
double  x,
double  a = -1,
double  b = 1 
)
static

Evaluate derivative of barycentric weights. This is easy and efficient via the DifferentiationMatrix.

Definition at line 62 of file Chebyshev2.cpp.

◆ DifferentiationMatrix()

Chebyshev2::DiffMatrix gtsam::Chebyshev2::DifferentiationMatrix ( size_t  N,
double  a = -1,
double  b = 1 
)
static

compute D = differentiation matrix, Trefethen00book p.53 when given a parameter vector f of function values at the Chebyshev points, D*f are the values of f'. https://people.maths.ox.ac.uk/trefethen/8all.pdf Theorem 8.4

Definition at line 147 of file Chebyshev2.cpp.

◆ IntegrationWeights()

Weights gtsam::Chebyshev2::IntegrationWeights ( size_t  N,
double  a = -1,
double  b = 1 
)
static

Evaluate Clenshaw-Curtis integration weights. Trefethen00book, pg 128, clencurt.m Note that N in clencurt.m is 1 less than our N K = N-1; theta = pi*(0:K)'/K; w = zeros(1,N); ii = 2:K; v = ones(K-1, 1); if mod(K,2) == 0 w(1) = 1/(K^2-1); w(N) = w(1); for k=1:K/2-1, v = v-2*cos(2*k*theta(ii))/(4*k^2-1); end v = v - cos(K*theta(ii))/(K^2-1); else w(1) = 1/K^2; w(N) = w(1); for k=1:K/2, v = v-2*cos(2*k*theta(ii))/(4*k^2-1); end end w(ii) = 2*v/K;

Definition at line 183 of file Chebyshev2.cpp.

◆ matrix()

template<size_t M>
static Matrix gtsam::Chebyshev2::matrix ( std::function< Eigen::Matrix< double, M, 1 >(double)>  f,
size_t  N,
double  a = -1,
double  b = 1 
)
inlinestatic

Create matrix of values at Chebyshev points given vector-valued function.

Definition at line 135 of file Chebyshev2.h.

◆ Point() [1/2]

static double gtsam::Chebyshev2::Point ( size_t  N,
int  j 
)
inlinestatic

Specific Chebyshev point.

Definition at line 55 of file Chebyshev2.h.

◆ Point() [2/2]

static double gtsam::Chebyshev2::Point ( size_t  N,
int  j,
double  a,
double  b 
)
inlinestatic

Specific Chebyshev point, within [a,b] interval.

Definition at line 64 of file Chebyshev2.h.

◆ Points() [1/2]

static Vector gtsam::Chebyshev2::Points ( size_t  N)
inlinestatic

All Chebyshev points.

Definition at line 72 of file Chebyshev2.h.

◆ Points() [2/2]

static Vector gtsam::Chebyshev2::Points ( size_t  N,
double  a,
double  b 
)
inlinestatic

All Chebyshev points, within [a,b] interval.

Definition at line 79 of file Chebyshev2.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:15