ROOT
master
Reference Guide
ChebyshevPol.cxx
Go to the documentation of this file.
1
// @(#)root/mathcore:$Id$
2
// Author: Fons Rademakers, 12/2012
3
4
/*************************************************************************
5
* Copyright (C) 1995-2012, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
//////////////////////////////////////////////////////////////////////////
13
// //
14
// Functions for the evaluation of the Chebyshev polynomials and the //
15
// ChebyshevPol class which can be used for creating a TF1. //
16
// //
17
//////////////////////////////////////////////////////////////////////////
18
19
#include "
Math/ChebyshevPol.h
"
20
21
namespace
ROOT
{
22
namespace
Math
{
23
namespace
Chebyshev {
24
template
<>
double
T<0>
(
double
) {
return
1;}
25
template
<>
double
T<1>
(
double
x
) {
return
x
;}
26
template
<>
double
T<2>
(
double
x
) {
return
2.0*
x
*
x
-1;}
27
template
<>
double
T<3>
(
double
x
) {
return
4.0*
x
*
x
*
x
-3.0*
x
;}
28
29
template
<>
double
Eval<0>
(
double
,
const
double
*
c
) {
return
c
[0];}
30
template
<>
double
Eval<1>
(
double
x
,
const
double
*
c
) {
return
c
[1]*
x
+
c
[0];}
31
template
<>
double
Eval<2>
(
double
x
,
const
double
*
c
) {
return
c
[2]*
Chebyshev::T<2>
(
x
) +
c
[1]*
x
+
c
[0];}
32
template
<>
double
Eval<3>
(
double
x
,
const
double
*
c
) {
return
c
[3]*
Chebyshev::T<3>
(
x
) +
Eval<2>
(
x
,
c
); }
33
}
34
}
35
}
c
#define c(i)
Definition:
RSha256.hxx:101
ROOT::Math::Chebyshev::T< 0 >
double T< 0 >(double)
Definition:
ChebyshevPol.cxx:24
ROOT::Math::Chebyshev::Eval< 2 >
double Eval< 2 >(double x, const double *c)
Definition:
ChebyshevPol.cxx:31
ROOT::Math::Chebyshev::Eval< 3 >
double Eval< 3 >(double x, const double *c)
Definition:
ChebyshevPol.cxx:32
x
Double_t x[n]
Definition:
legend1.C:17
ROOT::Math::Chebyshev::T< 3 >
double T< 3 >(double x)
Definition:
ChebyshevPol.cxx:27
ROOT::Math::Chebyshev::T< 2 >
double T< 2 >(double x)
Definition:
ChebyshevPol.cxx:26
ROOT::Math::Chebyshev::T< 1 >
double T< 1 >(double x)
Definition:
ChebyshevPol.cxx:25
ChebyshevPol.h
ROOT::Math::Chebyshev::Eval< 1 >
double Eval< 1 >(double x, const double *c)
Definition:
ChebyshevPol.cxx:30
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition:
EExecutionPolicy.hxx:4
Math
Namespace for new Math classes and functions.
ROOT::Math::Chebyshev::Eval< 0 >
double Eval< 0 >(double, const double *c)
Definition:
ChebyshevPol.cxx:29
math
mathcore
src
ChebyshevPol.cxx
ROOT master - Reference Guide Generated on Thu Mar 4 2021 12:28:15 (GVA Time) using Doxygen 1.9.0