Belle II Software development
nodes.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9
10#pragma once
11
12#include <Eigen/Dense>
13
14namespace Belle2 {
24 Eigen::VectorXd getWeights(int Size);
25
26
31 Eigen::VectorXd getNodes(int Size);
32
33
38 Eigen::VectorXd getPols(int Size, double x);
39
40
46 Eigen::VectorXd getPolsSum(int Size, Eigen::VectorXd x);
47
48
55 Eigen::MatrixXd getCoefs(int Size, bool isInverse = false);
56
57
59 double evalPol(const Eigen::VectorXd& polCoef, double x);
60
61
63 Eigen::MatrixXd getCoefsCheb(int oldSize);
64
65
69 Eigen::VectorXd interpol(const Eigen::VectorXd& xi, double x);
70
71
76 double interpol(Eigen::VectorXd xi, Eigen::VectorXd vals, double x);
77
79}
Eigen::VectorXd getWeights(int Size)
Get the vector of weights to calculate the integral over the Chebyshev nodes The nodes are by definit...
Definition: nodes.cc:29
Eigen::VectorXd getPols(int Size, double x)
Evaluate Chebyshev polynomials up to Size at point x It returns a vector of the P_i(x) for i=0....
Definition: nodes.cc:77
Eigen::MatrixXd getCoefsCheb(int oldSize)
Transformation matrix between Cheb nodes and Cheb coefficients with better normalization of the borde...
Definition: nodes.cc:162
Eigen::VectorXd interpol(const Eigen::VectorXd &xi, double x)
Get Interpolation vector k_i for point x from the function values at points xi (polynomial interpolat...
Eigen::MatrixXd getCoefs(int Size, bool isInverse=false)
Transformation matrix between Cheb nodes and coefficients of the Cheb polynomials Notice,...
Definition: nodes.cc:127
double evalPol(const Eigen::VectorXd &polCoef, double x)
Evaluate Cheb.
Eigen::VectorXd getPolsSum(int Size, Eigen::VectorXd x)
Calculate the Chebyshev polynomials of order i=0..Size-1 at points given in vector x_j and sum it ove...
Eigen::VectorXd getNodes(int Size)
Get the vector of positions of the Chebyshev nodes The nodes are by definition between 0 and 1,...
Definition: nodes.cc:65
Abstract base class for different kinds of events.