Expand description
Chebyshev polynomial toolkit: node generation, coefficient fitting, and Clenshaw evaluation — generic over scalar type.
§Overview
This crate provides the full pipeline for piecewise Chebyshev interpolation, as used in JPL DE-series ephemerides and cached lunar/planetary position evaluators:
nodes— Chebyshev node generation on[-1, 1]or mapped to an arbitrary interval.- [
fit] — DCT-based coefficient computation from function values at Chebyshev nodes. - [
eval] — Clenshaw-recurrence evaluation of a Chebyshev series (value, derivative, or both in one pass). segment— Piecewise Chebyshev approximation over uniform time segments, with automatic lookup andt → τnormalisation.
All core functions are generic over ChebyScalar, so they work with
raw f64 as well as typed quantities (qtty::Quantity<U>).
Re-exports§
pub use scalar::ChebyScalar;pub use segment::ChebySegment;pub use segment::ChebySegmentTable;
Modules§
Functions§
- evaluate
- Evaluate a Chebyshev polynomial using the Clenshaw algorithm.
- evaluate_
both - Evaluate both the Chebyshev polynomial and its derivative in one pass.
- evaluate_
derivative - Evaluate the derivative of a Chebyshev polynomial.
- fit_
coeffs - Compute Chebyshev coefficients from function values at the canonical Chebyshev nodes.
- fit_
from_ fn - Sample a function at
NChebyshev nodes on[start, end]and fit Chebyshev coefficients. - nodes
- Compute
NChebyshev nodes on[-1, 1]. - nodes_
mapped - Compute
NChebyshev nodes mapped to the interval[start, end].