gtsam 4.1.1
gtsam
Chebyshev.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2
3 * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4 * Atlanta, Georgia 30332-0415
5 * All Rights Reserved
6 * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
8 * See LICENSE for the license information
9
10 * -------------------------------------------------------------------------- */
11
19#pragma once
20
21#include <gtsam/base/Manifold.h>
22#include <gtsam/basis/Basis.h>
23
24#include <unsupported/Eigen/KroneckerProduct>
25
26namespace gtsam {
27
34struct Chebyshev1Basis : Basis<Chebyshev1Basis> {
35 using Parameters = Eigen::Matrix<double, -1, 1 /*Nx1*/>;
36
37 Parameters parameters_;
38
47 static Weights CalculateWeights(size_t N, double x, double a = -1,
48 double b = 1);
49
68 static Weights DerivativeWeights(size_t N, double x, double a = -1,
69 double b = 1);
70}; // Chebyshev1Basis
71
82struct Chebyshev2Basis : Basis<Chebyshev2Basis> {
83 using Parameters = Eigen::Matrix<double, -1, 1 /*Nx1*/>;
84
93 static Weights CalculateWeights(size_t N, double x, double a = -1,
94 double b = 1);
95
105 static Weights DerivativeWeights(size_t N, double x, double a = -1,
106 double b = 1);
107}; // Chebyshev2Basis
108
109} // namespace gtsam
Base class and basic functions for Manifold types.
Compute an interpolating basis.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
CRTP Base class for function bases.
Definition: Basis.h:95
Basis of Chebyshev polynomials of the first kind https://en.wikipedia.org/wiki/Chebyshev_polynomials#...
Definition: Chebyshev.h:34
static Weights CalculateWeights(size_t N, double x, double a=-1, double b=1)
Evaluate Chebyshev Weights on [-1,1] at x up to order N-1 (N values)
Definition: Chebyshev.cpp:39
static Weights DerivativeWeights(size_t N, double x, double a=-1, double b=1)
Evaluate Chebyshev derivative at x.
Definition: Chebyshev.cpp:54
Basis of Chebyshev polynomials of the second kind.
Definition: Chebyshev.h:82
static Weights DerivativeWeights(size_t N, double x, double a=-1, double b=1)
Evaluate Chebyshev derivative at x.
Definition: Chebyshev.cpp:79
static Weights CalculateWeights(size_t N, double x, double a=-1, double b=1)
Evaluate Chebyshev Weights on [-1,1] at any x up to order N-1 (N values).
Definition: Chebyshev.cpp:64