Go to the documentation of this file.
31 for (
size_t j = 0;
j <
N;
j++) {
45 weights(0) = 0.5 / distances(0);
48 double d = weights(0),
s = -1;
49 for (
size_t j = 1;
j <
N - 1;
j++,
s = -
s) {
50 weights(
j) =
s / distances(
j);
55 weights(
N - 1) = 0.5 *
s / distances(
N - 1);
73 for (
size_t j = 0;
j <
N;
j++) {
80 double cj = (
j == 0 ||
j ==
N - 1) ? 2. : 1.;
81 for (
size_t k = 0; k <
N; k++) {
82 if (
j == 0 && k == 0) {
84 weightDerivatives(k) = -(cj * (
N - 1) * (
N - 1) + 1) / 6.0;
85 }
else if (
j ==
N - 1 && k ==
N - 1) {
87 weightDerivatives(k) = (cj * (
N - 1) * (
N - 1) + 1) / 6.0;
91 weightDerivatives(k) = -0.5 * xj / (1 - xj2);
95 double ck = (k == 0 || k ==
N - 1) ? 2. : 1.;
96 t = ((
j + k) % 2) == 0 ? 1 : -1;
97 weightDerivatives(k) = (cj / ck) *
t / (xj - xk);
100 return 2 * weightDerivatives / (
b -
a);
114 for (
size_t j = 0;
j <
N;
j++) {
115 if (
j == 0 ||
j ==
N - 1) {
121 t = (
j % 2 == 0) ? 1 : -1;
123 double c =
t / distances(
j);
125 k += (
w *
c / distances(
j));
131 for (
size_t j = 0;
j <
N;
j++,
s = -
s) {
134 if (
j == 0 ||
j ==
N - 1) {
140 weightDerivatives(
j) = (
w * -
s / (
g * distances(
j) * distances(
j))) -
141 (
w * -
s * k / (
g2 * distances(
j)));
144 return weightDerivatives;
158 for (
size_t i = 0;
i <
N;
i++) {
160 double ci = (
i == 0 ||
i ==
N - 1) ? 2. : 1.;
161 for (
size_t j = 0;
j <
N;
j++) {
162 if (
i == 0 &&
j == 0) {
164 D(
i,
j) = -(ci * (
N - 1) * (
N - 1) + 1) / 6.0;
165 }
else if (
i ==
N - 1 &&
j ==
N - 1) {
167 D(
i,
j) = (ci * (
N - 1) * (
N - 1) + 1) / 6.0;
169 double xi2 =
xi *
xi;
170 D(
i,
j) = -
xi / (2 * (1 - xi2));
173 double cj = (
j == 0 ||
j ==
N - 1) ? 2. : 1.;
174 t = ((
i +
j) % 2) == 0 ? 1 : -1;
175 D(
i,
j) = (ci / cj) *
t / (
xi - xj);
180 return D / ((
b -
a) / 2.0);
188 weights(0) = 0.5 * (
b -
a) / (
K2 +
K % 2 - 1);
189 weights(
N - 1) = weights(0);
191 size_t last_k =
K / 2 +
K % 2 - 1;
193 for (
size_t i = 1;
i <=
N - 2; ++
i) {
194 double theta =
i *
M_PI /
K;
195 weights(
i) = (
K % 2 == 0) ? 1 -
cos(
K * theta) / (
K2 - 1) : 1;
197 for (
size_t k = 1; k <= last_k; ++k)
198 weights(
i) -= 2 *
cos(2 * k * theta) / (4 * k * k - 1);
199 weights(
i) *= (
b -
a) /
K;
Pseudo-spectral parameterization for Chebyshev polynomials of the second kind.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const double d[K][N]
static double Point(size_t N, int j, double a=-1, double b=1)
Specific Chebyshev point, within [a,b] interval. Default interval is [-1, 1].
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
static const Cal3Bundler K2(625, 1e-3, 1e-3)
Jet< T, N > cos(const Jet< T, N > &f)
static DiffMatrix DifferentiationMatrix(size_t N, double a=-1, double b=1)
Pose3 g2(g1.expmap(h *V1_g1))
void g(const string &key, int i)
static Weights CalculateWeights(size_t N, double x, double a=-1, double b=1)
static Weights IntegrationWeights(size_t N, double a=-1, double b=1)
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
static Weights DerivativeWeights(size_t N, double x, double a=-1, double b=1)
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:05