Mantid
Loading...
Searching...
No Matches
Framework
Kernel
src
Math
Distributions
ChebyshevPolynomial.cpp
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
//-----------------------------------------------------------------------------
8
// Includes
9
//-----------------------------------------------------------------------------
10
#include "
MantidKernel/Math/Distributions/ChebyshevPolynomial.h
"
11
12
#include <cassert>
13
#include <cmath>
14
15
using
std::acos;
16
using
std::cos;
17
18
namespace
Mantid::Kernel
{
19
20
//-----------------------------------------------------------------------------
21
// Public members
22
//-----------------------------------------------------------------------------
31
double
ChebyshevPolynomial::operator()
(
const
size_t
n
,
const
double
x
) {
32
assert(
x
>= -1.0 &&
x
<= 1.0);
33
return
cos(
static_cast<
double
>
(
n
) * acos(
x
));
34
}
35
36
}
// namespace Mantid::Kernel
n
size_t n
Definition:
AugmentedLagrangianOptimizer.cpp:42
ChebyshevPolynomial.h
Mantid::Geometry::x
I a m x
Definition:
SpaceGroupFactory.cpp:675
Mantid::Kernel
Definition:
AnnularRingAbsorption.h:15
Mantid::Kernel::ChebyshevPolynomial::operator()
double operator()(const size_t n, const double x)
Return the value of the nth Chebyshev polynomial of the first kind .
Definition:
ChebyshevPolynomial.cpp:31
Generated on Tue Jan 3 2023 11:57:51 for Mantid by
1.9.5