template<typename ArrayType>
class CoolProp::superancillary::ChebyshevExpansion< ArrayType >
A Chebyshev expansion of the form
\[
y = \sum_i c_iT_i(x)
\]
where c are the coefficients and \(T_i\) are the Chebyshev basis functions of the first kind
More advanced tools are possible in the ChebTools package in C++, but the essentials are available here
Definition at line 243 of file superancillary.h.
|
| ChebyshevExpansion () |
|
| ChebyshevExpansion (double xmin, double xmax, const ArrayType &coeff) |
| Constructor with bounds and coefficients. More...
|
|
| ChebyshevExpansion (const ChebyshevExpansion &ex)=default |
| Copy constructor. More...
|
|
ChebyshevExpansion & | operator= (ChebyshevExpansion &&ex)=default |
|
ChebyshevExpansion & | operator= (const ChebyshevExpansion &ex)=default |
|
const auto | xmin () const |
| Get the minimum value of the independent variable. More...
|
|
const auto | xmax () const |
| Get the maximum value of the independent variable. More...
|
|
const auto & | coeff () const |
| Get a const view on the expansion coefficients. More...
|
|
template<typename T > |
auto | eval (const T &x) const |
|
template<typename T > |
auto | eval_many (const T &x, T &y) const |
| A vectorized variant (for use with Python interface) More...
|
|
template<typename T > |
auto | eval_manyC (const T x[], T y[], std::size_t N) const |
| A vectorized variant in which arrays are C-style, assumed to be of the same length. More...
|
|
template<typename T > |
auto | eval_Eigen (const T &x, T &y) const |
| A vectorized variant (for use with Python interface) More...
|
|
Eigen::ArrayXd | get_nodes_realworld () const |
| Chebyshev-Lobatto nodes \(\cos(\pi j/N), j = 0,..., N \) mapped to the range [xmin, xmax]. More...
|
|
auto | solve_for_x_count (double y, double a, double b, unsigned int bits, std::size_t max_iter, double boundsytol) const |
|
auto | solve_for_x (double y, double a, double b, unsigned int bits, std::size_t max_iter, double boundsytol) const |
|
template<typename T > |
auto | solve_for_x_many (const T &y, double a, double b, unsigned int bits, std::size_t max_iter, double boundsytol, T &x, T &counts) const |
| A vectorized variant (for use with Python interface) More...
|
|
template<typename T > |
auto | solve_for_x_manyC (const T y[], std::size_t N, double a, double b, unsigned int bits, std::size_t max_iter, double boundsytol, T x[], T counts[]) const |
| A vectorized variant in which arrays are C-style, assumed to be of the same length. More...
|
|
ArrayType | do_derivs (std::size_t Nderiv) const |
|
template<typename ArrayType >
Solve for independent variable given a bracketing interval [a,b] with the use of the TOMS 748 algorithm from boost which is an improvement over Brent's method (in all cases, asymptotically, acccording to the boost docs)
- Parameters
-
y | target value to be matched |
a | left bound for interval |
b | right bound for interval |
bits | number of bits to be matched in TOMS748 solver |
max_iter | maximum nimber of function calls |
boundsytol | tolerance that is considered to be the right solution |
- Returns
- Tuple of value of x and the number of function evaluations required
Definition at line 327 of file superancillary.h.