cheby
Chebyshev polynomial toolkit for scientific computing in Rust.
cheby provides a full interpolation pipeline suitable for numerical kernels
and ephemeris-style piecewise approximations:
- Node generation on
[-1, 1]and mapped intervals. - Coefficient fitting via DCT identities.
- Stable Clenshaw evaluation (value, derivative, or both).
- Uniform piecewise segment tables with O(1) segment lookup.
All core APIs are generic over ChebyScalar, so they work with f64 and with
typed quantities such as qtty::Quantity<Kilometer>.
Installation
[]
= "0.1"
Quick start
use ;
const N: usize = 9;
let xi: = nodes;
let values: = from_fn;
let coeffs = fit_coeffs;
let tau = 0.42;
let approx = evaluate;
println!;
Segment-table workflow
use ChebySegmentTable;
let table: =
from_fn;
let = table.eval_both.unwrap;
println!;
Examples
Runnable examples are provided in examples/:
basic_interpolationsegment_tabletyped_quantities
Use:
See examples/README.md for details.
Tests and coverage
cheby includes:
- Unit tests inside modules.
- Functional integration tests in
tests/functional_pipeline.rs. - Doctests for public examples.
Run locally:
Coverage is gated in CI at >= 90% line coverage.
CI
GitHub Actions workflow: /.github/workflows/ci.yml
Jobs:
checkfmtclippy(-D warnings)test(unit/integration + docs)coverage(cargo +nightly llvm-cov, PR summary, 90% gate)
License
AGPL-3.0-only