DAS
3.0
Das Analysis System
Functions
Step::Basis Namespace Reference
Functions
double
Chebyshev
(double x, int i)
double
Legendre
(double x, int i)
Detailed Description
Bases for polynomials.
Function Documentation
◆
Chebyshev()
double Step::Basis::Chebyshev
(
double
x
,
int
i
)
Chebyshev of first kind.
225
{
226
if
(std::abs(x) > 1)
return
0.;
227
switch
(i) {
228
case
0:
return
1.;
229
case
1:
return
x;
230
default
:
return
2*x*
Chebyshev
(x, i-1)-
Chebyshev
(x, i-2);
231
}
232
}
◆
Legendre()
double Step::Basis::Legendre
(
double
x
,
int
i
)
Legendre.
237
{
238
if
(std::abs(x) > 1)
return
0.;
239
switch
(i) {
240
case
0:
return
1.;
241
case
1:
return
x;
242
default
:
return
( (2*i-1)*x*
Legendre
(x,i-1) - (i-1)*
Legendre
(x, i-2) )/i;
243
}
244
}
Step::Basis::Chebyshev
double Chebyshev(double x, int i)
Chebyshev of first kind.
Definition:
Step.h:224
Step::Basis::Legendre
double Legendre(double x, int i)
Legendre.
Definition:
Step.h:236
Step
Basis
Generated on Fri Dec 20 2024 19:01:49 for DAS by
1.8.18