|
HighMap library (C++)
|
Evaluates a Chebyshev polynomial series using Clenshaw recurrence. More...
#include <chebyshev.hpp>
Public Types | |
| using | value_type = float |
Public Member Functions | |
| ChebyshevEvaluator ()=default | |
| Default constructor. | |
| ChebyshevEvaluator (std::vector< value_type > coefficients) | |
| Construct from Chebyshev coefficients. | |
| void | set_coefficients (std::vector< value_type > coefficients) |
| Set Chebyshev coefficients. | |
| value_type | evaluate (value_type x) const noexcept |
| Evaluate the polynomial series at x. | |
| template<typename InputIt , typename OutputIt > | |
| void | evaluate_batch (InputIt begin, InputIt end, OutputIt out) const noexcept |
| Evaluate the series on a range of input values. | |
| int | degree () const noexcept |
| Get polynomial degree. | |
| const std::vector< value_type > & | coefficients () const noexcept |
| Get series coefficients. | |
Evaluates a Chebyshev polynomial series using Clenshaw recurrence.
Evaluates:
f(x) = sum_k c_k T_k(x)
where T_k are Chebyshev polynomials of the first kind.
Designed for very large numbers of evaluations with minimal overhead.
| using hmap::ChebyshevEvaluator::value_type = float |
|
default |
Default constructor.
|
inlineexplicit |
Construct from Chebyshev coefficients.
| coefficients | Series coefficients ordered by polynomial degree. |
|
inline |
Set Chebyshev coefficients.
| coefficients | Series coefficients ordered by polynomial degree. |
|
inlinenoexcept |
Evaluate the polynomial series at x.
Uses the Clenshaw recurrence algorithm.
| x | Evaluation coordinate. |
|
inlinenoexcept |
Evaluate the series on a range of input values.
| InputIt | Input iterator type. |
| OutputIt | Output iterator type. |
| begin | Input begin iterator. |
| end | Input end iterator. |
| out | Output iterator. |
|
inlinenoexcept |
Get polynomial degree.
|
inlinenoexcept |
Get series coefficients.